#include <MutableBufferClass.hpp>
Static Public Member Functions | |
static void | createInstance () |
Static Public Member Functions inherited from RexxObject | |
static void | decodeMessageName (RexxObject *target, RexxObject *message, RexxString *&messageName, RexxObject *&startScope) |
static void | createInstance () |
Static Public Member Functions inherited from RexxInternalObject | |
static size_t | getObjectHeaderSize () |
Static Public Attributes | |
static RexxClass * | classInstance = OREF_NULL |
Static Public Attributes inherited from RexxObject | |
static PCPPM | operatorMethods [] |
static RexxClass * | classInstance = OREF_NULL |
Protected Attributes | |
size_t | bufferLength |
size_t | defaultSize |
size_t | dataLength |
size_t | Attributes |
RexxObject * | encoding |
RexxBuffer * | data |
Friends | |
class | RexxMutableBufferClass |
Additional Inherited Members | |
Public Attributes inherited from RexxInternalObject | |
ObjectHeader | header |
RexxBehaviour * | behaviour |
Protected Member Functions inherited from RexxVirtualBase | |
virtual | ~RexxVirtualBase () |
virtual void | baseVirtual () |
Definition at line 61 of file MutableBufferClass.hpp.
RexxMutableBuffer::RexxMutableBuffer | ( | ) |
Default constructor.
Definition at line 147 of file MutableBufferClass.cpp.
References bufferLength, data, dataLength, DEFAULT_BUFFER_LENGTH, defaultSize, new_buffer(), OREF_NULL, and RexxBufferBase::setDataLength().
RexxMutableBuffer::RexxMutableBuffer | ( | size_t | l, |
size_t | d | ||
) |
Constructor with explicitly set size and default.
l | Initial length. |
d | The explicit default size. |
Definition at line 167 of file MutableBufferClass.cpp.
References bufferLength, data, defaultSize, new_buffer(), OREF_NULL, and setLength().
|
inline |
Definition at line 69 of file MutableBufferClass.hpp.
|
inline |
Definition at line 133 of file MutableBufferClass.hpp.
References RexxBufferBase::adjustGap(), and data.
Referenced by replaceAt().
RexxMutableBuffer * RexxMutableBuffer::append | ( | RexxObject * | obj | ) |
Definition at line 375 of file MutableBufferClass.cpp.
References ARG_ONE, RexxString::checkIsASCII(), copyData(), dataLength, ensureCapacity(), RexxString::getLength(), RexxString::getStringData(), isASCII(), setIsASCII(), setLength(), and stringArgument().
Referenced by RexxMemory::createImage(), and RexxArray::toString().
RexxMutableBuffer * RexxMutableBuffer::appendCstring | ( | const char * | _data, |
size_t | blength | ||
) |
Definition at line 396 of file MutableBufferClass.cpp.
References StringUtil::checkIsASCII(), RexxBufferBase::copyData(), data, dataLength, ensureCapacity(), isASCII(), setIsASCII(), and setLength().
RexxMutableBuffer * RexxMutableBuffer::caselessChangeStr | ( | RexxString * | needle, |
RexxString * | newNeedle, | ||
RexxInteger * | countArg | ||
) |
Do an inplace caseless changeStr operation on a mutablebuffer.
needle | The search needle. |
newNeedle | The replacement string. |
countArg | The number of occurrences to replace. |
Definition at line 1107 of file MutableBufferClass.cpp.
References ARG_ONE, ARG_THREE, ARG_TWO, StringUtil::caselessCountStr(), StringUtil::caselessPos(), RexxString::checkIsASCII(), copyData(), ensureCapacity(), getLength(), RexxString::getLength(), getStringData(), RexxString::getStringData(), isASCII(), Numerics::MAX_WHOLENUMBER, openGap(), optionalPositive(), setIsASCII(), setIsASCIIChecked(), setLength(), and stringArgument().
Referenced by RexxMemory::createImage().
RexxInteger * RexxMutableBuffer::caselessCountStrRexx | ( | RexxString * | needle | ) |
Definition at line 933 of file MutableBufferClass.cpp.
References ARG_ONE, StringUtil::caselessCountStr(), getLength(), getStringData(), new_integer(), and stringArgument().
Referenced by RexxMemory::createImage().
RexxInteger * RexxMutableBuffer::caselessLastPos | ( | RexxString * | needle, |
RexxInteger * | pstart, | ||
RexxInteger * | range | ||
) |
Perform a caseless search for the last position of a string within the buffer.
needle | The search needle. |
pstart | the starting position. |
Definition at line 874 of file MutableBufferClass.cpp.
References ARG_ONE, ARG_THREE, ARG_TWO, StringUtil::caselessLastPos(), getLength(), getStringData(), new_integer(), optionalLengthArgument(), optionalPositionArgument(), and stringArgument().
Referenced by RexxMemory::createImage().
RexxInteger * RexxMutableBuffer::caselessMatch | ( | RexxInteger * | start_, |
RexxString * | other, | ||
RexxInteger * | offset_, | ||
RexxInteger * | len_ | ||
) |
Test if regions within two strings match.
start_ | The starting compare position within the target string. This must be within the bounds of the string. |
other | The other compare string. |
offset_ | The starting offset of the compare string. This must be within the string bounds. The default start postion is 1. |
len_ | The length of the compare substring. The length and the offset must specify a valid substring of other. If not specified, this defaults to the substring from the offset to the end of the string. |
Definition at line 1479 of file MutableBufferClass.cpp.
References ARG_FOUR, ARG_ONE, ARG_THREE, ARG_TWO, Error_Incorrect_method_length, Error_Incorrect_method_position, getLength(), RexxString::getLength(), optionalLengthArgument(), optionalPositionArgument(), positionArgument(), primitiveCaselessMatch(), reportException(), stringArgument(), TheFalseObject, and TheTrueObject.
Referenced by RexxMemory::createImage().
RexxInteger * RexxMutableBuffer::caselessMatchChar | ( | RexxInteger * | position_, |
RexxString * | matchSet | ||
) |
Compare a single character at a give position against a set of characters to see if any of the characters is a match.
position_ | The character position |
matchSet | The set to compare against. |
Definition at line 1609 of file MutableBufferClass.cpp.
References ARG_ONE, ARG_TWO, Error_Incorrect_method_position, RexxString::getChar(), getCharB(), getLength(), RexxString::getLength(), positionArgument(), reportException(), stringArgument(), TheFalseObject, and TheTrueObject.
Referenced by RexxMemory::createImage().
RexxInteger * RexxMutableBuffer::caselessPos | ( | RexxString * | needle, |
RexxInteger * | pstart, | ||
RexxInteger * | range | ||
) |
Perform a caseless search for a string within the buffer.
needle | The search needle. |
pstart | the starting position. |
Definition at line 848 of file MutableBufferClass.cpp.
References ARG_ONE, ARG_THREE, ARG_TWO, StringUtil::caselessPos(), getLength(), getStringData(), new_integer(), optionalLengthArgument(), optionalPositionArgument(), and stringArgument().
Referenced by RexxMemory::createImage().
RexxInteger * RexxMutableBuffer::caselessWordPos | ( | RexxString * | phrase, |
RexxInteger * | pstart | ||
) |
Perform a caseless wordpos search on a string object.
phrase | The search phrase |
pstart | The starting search position. |
Definition at line 1769 of file MutableBufferClass.cpp.
References StringUtil::caselessWordPos(), getLength(), and getStringData().
Referenced by RexxMemory::createImage().
RexxMutableBuffer * RexxMutableBuffer::changeStr | ( | RexxString * | needle, |
RexxString * | newNeedle, | ||
RexxInteger * | countArg | ||
) |
Do an inplace changeStr operation on a mutablebuffer.
needle | The search needle. |
newNeedle | The replacement string. |
countArg | The number of occurrences to replace. |
Definition at line 955 of file MutableBufferClass.cpp.
References ARG_ONE, ARG_THREE, ARG_TWO, RexxString::checkIsASCII(), copyData(), StringUtil::countStr(), ensureCapacity(), getLength(), RexxString::getLength(), getStringData(), RexxString::getStringData(), isASCII(), Numerics::MAX_WHOLENUMBER, openGap(), optionalPositive(), StringUtil::pos(), setIsASCII(), setIsASCIIChecked(), setLength(), and stringArgument().
Referenced by RexxMemory::createImage().
bool RexxMutableBuffer::checkIsASCII | ( | ) |
Definition at line 358 of file MutableBufferClass.cpp.
References StringUtil::checkIsASCII(), getLength(), getStringData(), isASCII(), isASCIIChecked(), setIsASCII(), and setIsASCIIChecked().
Referenced by isASCIIRexx().
|
inline |
Definition at line 132 of file MutableBufferClass.hpp.
References RexxBufferBase::closeGap(), and data.
Referenced by delWord(), and mydelete().
|
virtual |
Reimplemented from RexxInternalObject.
Definition at line 242 of file MutableBufferClass.cpp.
References bufferLength, RexxInternalObject::clone(), copyData(), data, dataLength, defaultSize, RexxBuffer::getData(), new_buffer(), and setLength().
|
inline |
Definition at line 130 of file MutableBufferClass.hpp.
References RexxBufferBase::copyData(), and data.
Referenced by append(), caselessChangeStr(), changeStr(), copy(), insert(), RexxMutableBufferClass::newRexx(), overlay(), replaceAt(), and space().
RexxInteger * RexxMutableBuffer::countStrRexx | ( | RexxString * | needle | ) |
Definition at line 920 of file MutableBufferClass.cpp.
References ARG_ONE, StringUtil::countStr(), getLength(), getStringData(), new_integer(), and stringArgument().
Referenced by RexxMemory::createImage().
|
static |
Create initial class object at bootstrap time.
Definition at line 63 of file MutableBufferClass.cpp.
References CLASS_CREATE.
Referenced by RexxMemory::createImage().
RexxMutableBuffer * RexxMutableBuffer::delWord | ( | RexxInteger * | position, |
RexxInteger * | plength | ||
) |
Perform a delword operation on a mutable buffer
position | The position to delete. |
plength | The number of words to delete |
Definition at line 1784 of file MutableBufferClass.cpp.
References ARG_ONE, ARG_TWO, closeGap(), dataLength, getLength(), getStringData(), isASCII(), Numerics::MAX_WHOLENUMBER, StringUtil::nextWord(), optionalLengthArgument(), positionArgument(), setIsASCIIChecked(), setLength(), and StringUtil::skipBlanks().
Referenced by RexxMemory::createImage().
void RexxMutableBuffer::ensureCapacity | ( | size_t | addedLength | ) |
Definition at line 261 of file MutableBufferClass.cpp.
References bufferLength, RexxBufferBase::copyData(), data, dataLength, RexxBuffer::getData(), RexxBufferBase::getDataLength(), new_buffer(), OrefSet, and RexxBufferBase::setDataLength().
Referenced by append(), appendCstring(), caselessChangeStr(), changeStr(), insert(), overlay(), replaceAt(), setCapacity(), and space().
|
virtual |
Reimplemented from RexxVirtualBase.
Definition at line 229 of file MutableBufferClass.cpp.
References cleanUpFlatten, flatten_reference, and setUpFlatten.
|
inline |
Definition at line 127 of file MutableBufferClass.hpp.
References bufferLength.
|
inline |
Definition at line 93 of file MutableBufferClass.hpp.
References bufferLength, and new_integer().
Referenced by RexxMemory::createImage().
|
inline |
Definition at line 137 of file MutableBufferClass.hpp.
References bufferLength.
Referenced by setDataLength().
|
inline |
Definition at line 135 of file MutableBufferClass.hpp.
References getData().
Referenced by caselessMatchChar(), and matchChar().
|
inline |
Definition at line 129 of file MutableBufferClass.hpp.
References data, and RexxBuffer::getData().
Referenced by getCharB(), lower(), setCapacity(), translate(), and upper().
|
inline |
Definition at line 161 of file MutableBufferClass.hpp.
References encoding.
Referenced by setEncodingRexx().
|
inline |
Definition at line 125 of file MutableBufferClass.hpp.
References dataLength.
Referenced by caselessChangeStr(), caselessCountStrRexx(), caselessLastPos(), caselessMatch(), caselessMatchChar(), caselessPos(), caselessWordPos(), changeStr(), checkIsASCII(), countStrRexx(), delWord(), lastPos(), lengthRexx(), lower(), makeArrayRexx(), match(), matchChar(), posRexx(), primitiveCaselessMatch(), primitiveMatch(), setDataLength(), space(), subchar(), substr(), subWord(), subWords(), translate(), upper(), verify(), word(), wordIndex(), wordLength(), wordPos(), and words().
|
inline |
Definition at line 124 of file MutableBufferClass.hpp.
References data, and RexxBuffer::getData().
Referenced by caselessChangeStr(), caselessCountStrRexx(), caselessLastPos(), caselessPos(), caselessWordPos(), changeStr(), checkIsASCII(), countStrRexx(), delWord(), lastPos(), makeArrayRexx(), posRexx(), primitiveCaselessMatch(), primitiveMatch(), space(), subchar(), substr(), subWord(), subWords(), verify(), word(), wordIndex(), wordLength(), wordPos(), and words().
RexxMutableBuffer * RexxMutableBuffer::insert | ( | RexxObject * | str, |
RexxObject * | pos, | ||
RexxObject * | len, | ||
RexxObject * | pad | ||
) |
Definition at line 417 of file MutableBufferClass.cpp.
References ARG_FOUR, ARG_ONE, ARG_THREE, ARG_TWO, copyData(), dataLength, ensureCapacity(), RexxString::getLength(), RexxString::getStringData(), isASCII(), Numerics::minVal(), openGap(), optionalLengthArgument(), optionalNonNegative(), optionalPadArgument(), setData(), setIsASCII(), setLength(), and stringArgument().
Referenced by RexxMemory::createImage().
|
inline |
Definition at line 154 of file MutableBufferClass.hpp.
References Attributes, and STRING_ISASCII.
Referenced by append(), appendCstring(), caselessChangeStr(), changeStr(), checkIsASCII(), delWord(), insert(), mydelete(), overlay(), replaceAt(), setBufferLength(), setDataLength(), and translate().
|
inline |
Definition at line 142 of file MutableBufferClass.hpp.
References Attributes, and STRING_ISASCII_CHECKED.
Referenced by checkIsASCII().
RexxInteger * RexxMutableBuffer::isASCIIRexx | ( | ) |
Definition at line 368 of file MutableBufferClass.cpp.
References checkIsASCII(), TheFalseObject, and TheTrueObject.
Referenced by RexxMemory::createImage().
RexxInteger * RexxMutableBuffer::lastPos | ( | RexxString * | needle, |
RexxInteger * | _start, | ||
RexxInteger * | _range | ||
) |
Perform a search for the last position of a string within the buffer.
needle | The search needle. |
pstart | the starting position. |
Definition at line 832 of file MutableBufferClass.cpp.
References getLength(), getStringData(), and StringUtil::lastPosRexx().
Referenced by RexxMemory::createImage().
RexxObject * RexxMutableBuffer::lengthRexx | ( | ) |
Return the length of the data in the buffer currently.
Definition at line 352 of file MutableBufferClass.cpp.
References getLength(), and new_integer().
Referenced by RexxMemory::createImage().
|
virtual |
Reimplemented from RexxVirtualBase.
Definition at line 210 of file MutableBufferClass.cpp.
References data, and memory_mark.
|
virtual |
Reimplemented from RexxVirtualBase.
Definition at line 219 of file MutableBufferClass.cpp.
References data, and memory_mark_general.
RexxMutableBuffer * RexxMutableBuffer::lower | ( | RexxInteger * | _start, |
RexxInteger * | _length | ||
) |
Rexx exported method stub for the lower() method.
start | The optional starting location. Defaults to the first character if not specified. |
length | The length to convert. Defaults to the segment from the start position to the end of the string. |
Definition at line 1260 of file MutableBufferClass.cpp.
References ARG_ONE, ARG_TWO, getData(), getLength(), Numerics::minVal(), optionalLengthArgument(), and optionalPositionArgument().
Referenced by RexxMemory::createImage().
|
virtual |
Baseclass optimization for handling request array calls.
Reimplemented from RexxInternalObject.
Definition at line 769 of file MutableBufferClass.cpp.
References RexxObject::makeArrayRexx(), and OREF_NULL.
RexxArray * RexxMutableBuffer::makeArrayRexx | ( | RexxString * | div | ) |
Definition at line 910 of file MutableBufferClass.cpp.
References getLength(), getStringData(), and StringUtil::makearray().
|
virtual |
Reimplemented from RexxInternalObject.
Definition at line 756 of file MutableBufferClass.cpp.
References data, RexxBuffer::getData(), and new_string().
Referenced by primitiveMakeString(), and RexxArray::toString().
RexxInteger * RexxMutableBuffer::match | ( | RexxInteger * | start_, |
RexxString * | other, | ||
RexxInteger * | offset_, | ||
RexxInteger * | len_ | ||
) |
Test if regions within two strings match.
start_ | The starting compare position within the target string. This must be within the bounds of the string. |
other | The other compare string. |
offset_ | The starting offset of the compare string. This must be within the string bounds. The default start postion is 1. |
len_ | The length of the compare substring. The length and the offset must specify a valid substring of other. If not specified, this defaults to the substring from the offset to the end of the string. |
Definition at line 1435 of file MutableBufferClass.cpp.
References ARG_FOUR, ARG_ONE, ARG_THREE, ARG_TWO, Error_Incorrect_method_length, Error_Incorrect_method_position, getLength(), RexxString::getLength(), optionalLengthArgument(), optionalPositionArgument(), positionArgument(), primitiveMatch(), reportException(), stringArgument(), TheFalseObject, and TheTrueObject.
Referenced by RexxMemory::createImage().
RexxInteger * RexxMutableBuffer::matchChar | ( | RexxInteger * | position_, |
RexxString * | matchSet | ||
) |
Compare a single character at a give position against a set of characters to see if any of the characters is a match.
position_ | The character position |
matchSet | The set to compare against. |
Definition at line 1572 of file MutableBufferClass.cpp.
References ARG_ONE, ARG_TWO, Error_Incorrect_method_position, RexxString::getChar(), getCharB(), getLength(), RexxString::getLength(), positionArgument(), reportException(), stringArgument(), TheFalseObject, and TheTrueObject.
Referenced by RexxMemory::createImage().
RexxMutableBuffer * RexxMutableBuffer::mydelete | ( | RexxObject * | _start, |
RexxObject * | len | ||
) |
Definition at line 671 of file MutableBufferClass.cpp.
References ARG_ONE, ARG_TWO, closeGap(), dataLength, isASCII(), optionalLengthArgument(), positionArgument(), setIsASCIIChecked(), and setLength().
Referenced by RexxMemory::createImage().
|
inline |
Definition at line 131 of file MutableBufferClass.hpp.
References data, and RexxBufferBase::openGap().
Referenced by caselessChangeStr(), changeStr(), insert(), and space().
void * RexxMutableBuffer::operator new | ( | size_t | size | ) |
Create a new mutable buffer object from a potential subclass.
size | The size of the buffer object. |
Definition at line 187 of file MutableBufferClass.cpp.
References new_object(), and T_MutableBuffer.
void * RexxMutableBuffer::operator new | ( | size_t | size, |
RexxClass * | bufferClass | ||
) |
Create a new mutable buffer object from a potential subclass.
size | The size of the buffer object. |
bufferClass | The class of the buffer object. |
Definition at line 202 of file MutableBufferClass.cpp.
References new_object(), RexxInternalObject::setBehaviour(), and T_MutableBuffer.
|
inline |
Definition at line 64 of file MutableBufferClass.hpp.
RexxMutableBuffer * RexxMutableBuffer::overlay | ( | RexxObject * | str, |
RexxObject * | pos, | ||
RexxObject * | len, | ||
RexxObject * | pad | ||
) |
Definition at line 503 of file MutableBufferClass.cpp.
References ARG_FOUR, ARG_ONE, ARG_THREE, ARG_TWO, copyData(), dataLength, ensureCapacity(), RexxString::getLength(), RexxString::getStringData(), isASCII(), Numerics::minVal(), optionalLengthArgument(), optionalPadArgument(), optionalPositionArgument(), setData(), setIsASCII(), setLength(), and stringArgument().
Referenced by RexxMemory::createImage().
RexxInteger * RexxMutableBuffer::posRexx | ( | RexxString * | needle, |
RexxInteger * | pstart, | ||
RexxInteger * | range | ||
) |
Perform a search for a string within the buffer.
needle | The search needle. |
pstart | the starting position. |
Definition at line 815 of file MutableBufferClass.cpp.
References getLength(), getStringData(), and StringUtil::posRexx().
Referenced by RexxMemory::createImage().
bool RexxMutableBuffer::primitiveCaselessMatch | ( | stringsize_t | _start, |
RexxString * | other, | ||
stringsize_t | offset, | ||
stringsize_t | len | ||
) |
Perform a caselesee compare of regions of two string objects. Returns true if the two regions match, returns false for mismatches.
start | The starting offset within the target string. |
other | The source string for the compare. |
offset | The offset of the substring of the other string to use. |
len | The length of the substring to compare. |
Definition at line 1545 of file MutableBufferClass.cpp.
References StringUtil::caselessCompare(), getLength(), getStringData(), and RexxString::getStringData().
Referenced by caselessMatch().
|
virtual |
Handle the primitive class makeString optimization. This is required because MutableBuffer implements a STRING method.
Reimplemented from RexxInternalObject.
Definition at line 782 of file MutableBufferClass.cpp.
References makeString().
bool RexxMutableBuffer::primitiveMatch | ( | stringsize_t | _start, |
RexxString * | other, | ||
stringsize_t | offset, | ||
stringsize_t | len | ||
) |
Perform a compare of regions of two string objects. Returns true if the two regions match, returns false for mismatches.
start | The starting offset within the target string. |
other | The source string for the compare. |
offset | The offset of the substring of the other string to use. |
len | The length of the substring to compare. |
Definition at line 1518 of file MutableBufferClass.cpp.
References getLength(), getStringData(), and RexxString::getStringData().
Referenced by match().
RexxMutableBuffer * RexxMutableBuffer::replaceAt | ( | RexxObject * | str, |
RexxObject * | pos, | ||
RexxObject * | len, | ||
RexxObject * | pad | ||
) |
Replace a target substring within a string with a new string value. This is similar overlay, but replacing might cause the characters following the replacement position to be shifted to the left or right.
str | The replacement string. |
pos | The target position (required). |
len | The target length (optional). If not specified, the length of the replacement string is used, and this is essentially an overlay operation. |
pad | A padding character if padding is required. The default pad is a ' '. Padding only occurs if the replacement position is beyond the current data length. |
Definition at line 582 of file MutableBufferClass.cpp.
References adjustGap(), ARG_FOUR, ARG_ONE, ARG_THREE, ARG_TWO, copyData(), dataLength, ensureCapacity(), RexxString::getStringData(), isASCII(), optionalLengthArgument(), optionalPadArgument(), positionArgument(), setData(), setIsASCII(), setLength(), and stringArgument().
Referenced by RexxMemory::createImage().
RexxObject * RexxMutableBuffer::setBufferLength | ( | size_t | newsize | ) |
Definition at line 704 of file MutableBufferClass.cpp.
References bufferLength, RexxBufferBase::copyData(), data, dataLength, defaultSize, RexxBuffer::getData(), isASCII(), Numerics::minVal(), new_buffer(), OrefSet, setIsASCIIChecked(), and setLength().
Referenced by setBufferSize().
RexxObject * RexxMutableBuffer::setBufferSize | ( | RexxInteger * | size | ) |
Definition at line 746 of file MutableBufferClass.cpp.
References ARG_ONE, lengthArgument(), and setBufferLength().
Referenced by RexxMemory::createImage().
char * RexxMutableBuffer::setCapacity | ( | size_t | newLength | ) |
Set the capacity of the buffer.
newLength | The new buffer length |
Definition at line 333 of file MutableBufferClass.cpp.
References bufferLength, ensureCapacity(), and getData().
|
inline |
Definition at line 134 of file MutableBufferClass.hpp.
References data, and RexxBufferBase::setData().
Referenced by insert(), overlay(), replaceAt(), setDataLength(), and space().
size_t RexxMutableBuffer::setDataLength | ( | size_t | newLength | ) |
Set the length of the data in the buffer. The limit is the current capacity of the buffer. If the length is extended beyond the current length, the extra characters of the buffer will be filled with nulls.
newLength | The new datalength. This is capped to the capacity of the buffer. |
Definition at line 299 of file MutableBufferClass.cpp.
References dataLength, getCapacity(), getLength(), isASCII(), setData(), and setIsASCIIChecked().
|
inline |
Definition at line 162 of file MutableBufferClass.hpp.
References encoding, OREF_NULL, OrefSet, and RexxInternalObject::setHasReferences().
Referenced by setEncodingRexx().
|
inline |
Definition at line 167 of file MutableBufferClass.hpp.
References getEncoding(), and setEncoding().
Referenced by RexxMemory::createImage().
|
inline |
Definition at line 155 of file MutableBufferClass.hpp.
References Attributes, and STRING_ISASCII.
Referenced by append(), appendCstring(), caselessChangeStr(), changeStr(), checkIsASCII(), insert(), overlay(), replaceAt(), setIsASCIIChecked(), space(), and translate().
|
inline |
Definition at line 143 of file MutableBufferClass.hpp.
References Attributes, setIsASCII(), and STRING_ISASCII_CHECKED.
Referenced by caselessChangeStr(), changeStr(), checkIsASCII(), delWord(), mydelete(), setBufferLength(), setDataLength(), and translate().
|
inline |
Definition at line 126 of file MutableBufferClass.hpp.
References data, dataLength, and RexxBufferBase::setDataLength().
Referenced by append(), appendCstring(), caselessChangeStr(), changeStr(), copy(), delWord(), insert(), mydelete(), RexxMutableBufferClass::newRexx(), overlay(), replaceAt(), RexxMutableBuffer(), and setBufferLength().
RexxMutableBuffer * RexxMutableBuffer::space | ( | RexxInteger * | space_count, |
RexxString * | pad | ||
) |
Do an inplace space() operation on a mutable buffer.
space_count | The number of pad characters between each word |
pad | The pad character |
Definition at line 1851 of file MutableBufferClass.cpp.
References ARG_ONE, ARG_TWO, copyData(), dataLength, ensureCapacity(), getLength(), getStringData(), StringUtil::nextWord(), openGap(), optionalLengthArgument(), optionalPadArgument(), setData(), and setIsASCII().
Referenced by RexxMemory::createImage().
RexxString * RexxMutableBuffer::subchar | ( | RexxInteger * | positionArg | ) |
Extract a single character from a string object. Returns a null string if the specified position is beyond the bounds of the string.
positionArg | The position of the target character. Must be a positive whole number. |
Definition at line 903 of file MutableBufferClass.cpp.
References getLength(), getStringData(), and StringUtil::subchar().
Referenced by RexxMemory::createImage().
RexxString * RexxMutableBuffer::substr | ( | RexxInteger * | startPosition, |
RexxInteger * | len, | ||
RexxString * | pad | ||
) |
Definition at line 797 of file MutableBufferClass.cpp.
References getLength(), getStringData(), and StringUtil::substr().
Referenced by RexxMemory::createImage().
RexxString * RexxMutableBuffer::subWord | ( | RexxInteger * | position, |
RexxInteger * | plength | ||
) |
Perform a subword extraction from a mutable buffer.
position | The first word to be extracted. |
plength | The number of words to extract. |
Definition at line 1662 of file MutableBufferClass.cpp.
References getLength(), getStringData(), and StringUtil::subWord().
Referenced by RexxMemory::createImage().
RexxArray * RexxMutableBuffer::subWords | ( | RexxInteger * | position, |
RexxInteger * | plength | ||
) |
Returns an array of all words contained in the given range of the string, using the same extraction rules used for subWord() and word().
position | The optional starting position. If not provided, extraction starts with the first word. |
plength | The number of words to extract. If omitted, will extract from the starting postion to the end of the string. |
Definition at line 1682 of file MutableBufferClass.cpp.
References getLength(), getStringData(), and StringUtil::subWords().
Referenced by RexxMemory::createImage().
RexxMutableBuffer * RexxMutableBuffer::translate | ( | RexxString * | tableo, |
RexxString * | tablei, | ||
RexxString * | pad, | ||
RexxInteger * | _start, | ||
RexxInteger * | _range | ||
) |
translate characters in the buffer using a translation table.
tableo | The output table specification |
tablei | The input table specification |
pad | An optional padding character (default is a space). |
_start | The starting position to translate. |
_range | The length to translate |
Definition at line 1343 of file MutableBufferClass.cpp.
References ARG_FOUR, ARG_ONE, ARG_THREE, ARG_TWO, getData(), getLength(), RexxString::getLength(), RexxString::getStringData(), isASCII(), StringUtil::memPos(), Numerics::minVal(), optionalLengthArgument(), optionalPadArgument(), optionalPositionArgument(), optionalStringArgument(), OREF_NULL, setIsASCII(), setIsASCIIChecked(), and upper().
Referenced by RexxMemory::createImage().
RexxMutableBuffer * RexxMutableBuffer::upper | ( | RexxInteger * | _start, |
RexxInteger * | _length | ||
) |
Rexx exported method stub for the upper() method.
start | The optional starting location. Defaults to the first character if not specified. |
length | The length to convert. Defaults to the segment from the start position to the end of the string. |
Definition at line 1301 of file MutableBufferClass.cpp.
References ARG_ONE, ARG_TWO, getData(), getLength(), Numerics::minVal(), optionalLengthArgument(), and optionalPositionArgument().
Referenced by RexxMemory::createImage(), and translate().
RexxInteger * RexxMutableBuffer::verify | ( | RexxString * | ref, |
RexxString * | option, | ||
RexxInteger * | _start, | ||
RexxInteger * | range | ||
) |
Perform a character verify operation on a mutable buffer.
ref | The reference string. |
option | The match/nomatch option. |
_start | The start position for the verify. |
range | The range to search |
Definition at line 1647 of file MutableBufferClass.cpp.
References getLength(), getStringData(), and StringUtil::verify().
Referenced by RexxMemory::createImage().
RexxString * RexxMutableBuffer::word | ( | RexxInteger * | position | ) |
Extract a given word from a mutable buffer.
position | The target word position. |
Definition at line 1696 of file MutableBufferClass.cpp.
References getLength(), getStringData(), and StringUtil::word().
Referenced by RexxMemory::createImage().
RexxInteger * RexxMutableBuffer::wordIndex | ( | RexxInteger * | position | ) |
return the index of a given word position in a mutable buffer
position | The target word position. |
Definition at line 1711 of file MutableBufferClass.cpp.
References getLength(), getStringData(), and StringUtil::wordIndex().
Referenced by RexxMemory::createImage().
RexxInteger * RexxMutableBuffer::wordLength | ( | RexxInteger * | position | ) |
return the length of a given word position in a mutable buffer
position | The target word position. |
Definition at line 1727 of file MutableBufferClass.cpp.
References getLength(), getStringData(), and StringUtil::wordLength().
Referenced by RexxMemory::createImage().
RexxInteger * RexxMutableBuffer::wordPos | ( | RexxString * | phrase, |
RexxInteger * | pstart | ||
) |
Perform a wordpos search on a mutablebuffer object.
phrase | The search phrase |
pstart | The starting search position. |
Definition at line 1754 of file MutableBufferClass.cpp.
References getLength(), getStringData(), and StringUtil::wordPos().
Referenced by RexxMemory::createImage().
RexxInteger * RexxMutableBuffer::words | ( | ) |
Return the count of words in the buffer.
Definition at line 1738 of file MutableBufferClass.cpp.
References getLength(), getStringData(), new_integer(), and StringUtil::wordCount().
Referenced by RexxMemory::createImage().
|
friend |
Definition at line 62 of file MutableBufferClass.hpp.
|
protected |
Definition at line 181 of file MutableBufferClass.hpp.
Referenced by isASCII(), isASCIIChecked(), setIsASCII(), and setIsASCIIChecked().
|
protected |
Definition at line 178 of file MutableBufferClass.hpp.
Referenced by copy(), ensureCapacity(), getBufferLength(), getBufferSize(), getCapacity(), RexxMutableBuffer(), setBufferLength(), and setCapacity().
Definition at line 175 of file MutableBufferClass.hpp.
|
protected |
Definition at line 183 of file MutableBufferClass.hpp.
Referenced by adjustGap(), appendCstring(), closeGap(), copy(), copyData(), ensureCapacity(), getData(), getStringData(), live(), liveGeneral(), makeString(), openGap(), RexxMutableBuffer(), setBufferLength(), setData(), and setLength().
|
protected |
Definition at line 180 of file MutableBufferClass.hpp.
Referenced by append(), appendCstring(), copy(), delWord(), ensureCapacity(), getLength(), insert(), mydelete(), overlay(), replaceAt(), RexxMutableBuffer(), setBufferLength(), setDataLength(), setLength(), and space().
|
protected |
Definition at line 179 of file MutableBufferClass.hpp.
Referenced by copy(), RexxMutableBuffer(), and setBufferLength().
|
protected |
Definition at line 182 of file MutableBufferClass.hpp.
Referenced by getEncoding(), and setEncoding().