![]() | InDesign SDK 20.5 |
#include <DataWrapper.h>
Public Member Functions | |
| DataWrapper (VOS_Object *block, const WideString *str, int32 charOffset) | |
| DataWrapper (const DataWrapper< textchar > ©) | |
| DataWrapper< textchar > & | operator= (const DataWrapper< textchar > ©) |
| operator const textchar * () | |
| WideString::const_iterator | GetIteratorAt (int32 charOffset) const |
| void | ClearOffset () |
| int32 | CharOffsetToUTF16Offset (int32 charOffset) const |
| bool16 | HasSurrogates () const |
| const WideString * | GetData () const |
The specialized DataWrapper<textchar> object is used to hold text contained in the text system without making a copy. It has the pointer to the text, and also the ref-counted object that owns the data.
| int32 DataWrapper< textchar >::CharOffsetToUTF16Offset | ( | int32 | charOffset | ) | const |
convert the character offset into a UTF16 buffer offset. Will return the offset when there are no surrogates.
| charOffset | is the character offset. |
| inline |
Clear the offset contained in this object. The offset isn't really used, so this function is pretty much useless. Will be removed.
| inline |
Accessor for the underlying string data.
| WideString::const_iterator DataWrapper< textchar >::GetIteratorAt | ( | int32 | charOffset | ) | const |
convert this DataWrapper<textchar> into a WideStringIterator for walking over the text using iterator semantics.
| charOffset | is the offset within this data to start iterating from. |
| inline |
Does the current data contain surrogate characters (32bit unicode values encoded using UTF16).
| inline |
cast operator for this textchar version of DataWrapper – get a pointer to the data. fCharOffset is actually unused at this time, and is only set by the constructor.