RexxStem Class Reference

#include <StemClass.hpp>

Inheritance diagram for RexxStem:
[legend]

Public Member Functions

void * operator new (size_t)
 
void * operator new (size_t size, void *ptr)
 
 RexxStem (RexxString *)
 
 RexxStem (RESTORETYPE restoreType)
 
void live (size_t)
 
void liveGeneral (int reason)
 
void flatten (RexxEnvelope *)
 
RexxObjectcopy ()
 
void copyFrom (RexxCompoundTable &_tails)
 
bool numberValue (wholenumber_t &result, size_t precision)
 
bool numberValue (wholenumber_t &result)
 
bool unsignedNumberValue (stringsize_t &result, size_t precision)
 
bool unsignedNumberValue (stringsize_t &result)
 
bool doubleValue (double &result)
 
RexxNumberStringnumberString ()
 
RexxIntegerintegerValue (size_t)
 
RexxStringstringValue ()
 
RexxArraymakeArray ()
 
RexxArrayallItems ()
 
RexxArrayallIndexes ()
 
RexxSuppliersupplier ()
 
RexxDirectorytoDirectory ()
 
RexxObjectrequest (RexxString *)
 
RexxObjectempty ()
 
RexxObjectisEmpty ()
 
size_t items ()
 
void dropValue ()
 
RexxObjectgetStemValue ()
 
RexxObjectunknown (RexxString *, RexxArray *, RexxDirectory *)
 
RexxObjectbracket (RexxObject **, size_t, size_t)
 
RexxObjectbracketEqual (RexxObject **, size_t, size_t)
 
RexxObjecthasIndex (RexxObject **, size_t, size_t)
 
RexxObjectremove (RexxObject **, size_t, size_t)
 
RexxObjecthasItem (RexxObject *)
 
RexxObjectindex (RexxObject *)
 
RexxObjectitemsRexx ()
 
RexxObjectremoveItem (RexxObject *)
 
RexxStringtail (RexxArray *, size_t)
 
RexxObjectnewRexx (RexxObject **, size_t, size_t)
 
RexxObjectevaluateCompoundVariableValue (RexxActivation *context, RexxString *stemVariableName, RexxCompoundTail *resolved_tail)
 
RexxObjectgetCompoundVariableValue (RexxCompoundTail *resolved_tail)
 
RexxObjectgetCompoundVariableRealValue (RexxCompoundTail *resolved_tail)
 
RexxObjectrealCompoundVariableValue (RexxCompoundTail *resolved_tail)
 
RexxCompoundElementgetCompoundVariable (RexxCompoundTail *name)
 
RexxCompoundElementexposeCompoundVariable (RexxCompoundTail *name)
 
RexxCompoundElementfindCompoundVariable (RexxCompoundTail *name)
 
RexxCompoundElementfindByValue (RexxObject *target)
 
void dropCompoundVariable (RexxCompoundTail *name)
 
void setCompoundVariable (RexxCompoundTail *name, RexxObject *value)
 
void setValue (RexxObject *value)
 
RexxArraytailArray ()
 
RexxCompoundElementnextVariable (RexxNativeActivation *activation)
 
RexxObjecthandleNovalue (RexxActivation *context, RexxString *name, RexxObject *defaultValue, RexxCompoundElement *variable)
 
void expose (RexxCompoundElement *variable)
 
bool sort (RexxString *prefix, int order, int type, size_t start, size_t end, size_t firstcol, size_t lastcol)
 
void mergeSort (SortData *sd, int(*comparator)(SortData *, RexxString *, RexxString *), RexxString **strings, RexxString **working, size_t left, size_t right)
 
void merge (SortData *sd, int(*comparator)(SortData *, RexxString *, RexxString *), RexxString **strings, RexxString **working, size_t left, size_t mid, size_t right)
 
size_t find (SortData *sd, int(*comparator)(SortData *, RexxString *, RexxString *), RexxString **strings, RexxString *val, int bnd, size_t left, size_t right)
 
void arraycopy (RexxString **source, size_t start, RexxString **target, size_t index, size_t count)
 
bool compoundVariableExists (RexxCompoundTail *resolved_tail)
 
RexxStringgetName ()
 
RexxCompoundElementfirst ()
 
RexxStringcreateCompoundName (RexxCompoundTail *tailPart)
 
void init ()
 
void setElement (const char *tail, RexxObject *value)
 
void setElement (size_t tail, RexxObject *value)
 
void dropElement (const char *tail)
 
void dropElement (size_t tail)
 
void dropElement (RexxCompoundTail *tail)
 
RexxObjectgetElement (size_t tail)
 
RexxObjectgetElement (const char *tail)
 
RexxObjectgetElement (RexxCompoundTail *tail)
 
- Public Member Functions inherited from RexxObject
void * operator new (size_t, RexxClass *)
 
void * operator new (size_t, RexxClass *, RexxObject **, size_t, size_t)
 
void * operator new (size_t size, void *objectPtr)
 
void operator delete (void *, void *)
 
void operator delete (void *)
 
void operator delete (void *, RexxClass *)
 
void operator delete (void *, RexxClass *, RexxObject **, size_t)
 
RexxObjectnewRexx (RexxObject **arguments, size_t argCount, size_t named_argCount)
 
RexxObjectnewObject ()
 
 operator RexxInternalObject * ()
 
 RexxObject ()
 
 RexxObject (RESTORETYPE restoreType)
 
void initializeNewObject (size_t size, size_t mark, void *vft, RexxBehaviour *b)
 
void initializeNewObject (size_t mark, void *vft, RexxBehaviour *b)
 
virtual ~RexxObject ()
 
virtual RexxObjectdefMethod (RexxString *, RexxMethod *, RexxString *a=OREF_NULL)
 
virtual RexxStringdefaultName ()
 
virtual RexxIntegerhasMethod (RexxString *msg)
 
bool hasUninitMethod ()
 
RexxObjectinit ()
 
void uninit ()
 
HashCode hash ()
 
bool truthValue (int)
 
virtual bool logicalValue (logical_t &)
 
RexxStringmakeString ()
 
RexxTextmakeText ()
 
void copyIntoTail (RexxCompoundTail *buffer)
 
RexxTexttextValue ()
 
RexxStringrequestString ()
 
RexxStringrequestStringNoNOSTRING ()
 
RexxTextrequestText ()
 
RexxIntegerrequestInteger (size_t)
 
bool requestNumber (wholenumber_t &, size_t)
 
bool requestUnsignedNumber (stringsize_t &, size_t)
 
RexxArrayrequestArray ()
 
RexxDirectoryrequestDirectory ()
 
RexxStringrequiredString (RexxString *kind, size_t)
 
RexxStringrequiredString (RexxString *kind, const char *)
 
RexxStringrequiredString ()
 
RexxIntegerrequiredInteger (RexxString *kind, size_t, size_t)
 
wholenumber_t requiredNumber (RexxString *kind, size_t position, size_t precision=Numerics::ARGUMENT_DIGITS)
 
stringsize_t requiredPositive (RexxString *kind, size_t position, size_t precision=Numerics::ARGUMENT_DIGITS)
 
stringsize_t requiredNonNegative (RexxString *kind, size_t position, size_t precision=Numerics::ARGUMENT_DIGITS)
 
bool isEqual (RexxObject *)
 
bool isInstanceOf (RexxClass *)
 
RexxObjectisInstanceOfRexx (RexxClass *)
 
RexxObjectisNilRexx ()
 
RexxMethodinstanceMethod (RexxString *)
 
RexxSupplierinstanceMethods (RexxClass *)
 
RexxMethodinstanceMethodRexx (RexxString *)
 
RexxSupplierinstanceMethodsRexx (RexxClass *)
 
RexxObjectdynamicTargetRexx (RexxObject **arguments, size_t argCount, size_t named_argCount)
 
RexxStringobjectName ()
 
RexxObjectobjectNameEquals (RexxObject *)
 
RexxClassclassObject ()
 
RexxObjectsetMethod (RexxString *, RexxMethod *, RexxString *a=OREF_NULL)
 
RexxObjectunsetMethod (RexxString *)
 
RexxObjectrequestRexx (RexxString *)
 
RexxMessagestart (RexxObject **, size_t, size_t)
 
RexxMessagestartWith (RexxObject *, RexxArray *, RexxObject **, size_t)
 
RexxObjectsend (RexxObject **, size_t, size_t)
 
RexxObjectsendWith (RexxObject *, RexxArray *, RexxObject **, size_t)
 
RexxMessagestartCommon (RexxObject *message, RexxObject **arguments, size_t argCount, size_t named_argCount)
 
RexxStringoref ()
 
RexxObjectpmdict ()
 
RexxObjectrun (RexxObject **, size_t, size_t)
 
bool messageSend (RexxString *, RexxObject **, size_t, size_t, ProtectedObject &, bool processUnknown=true, bool dynamicTarget=true)
 
bool messageSend (RexxString *, RexxObject **, size_t, size_t, RexxObject *, ProtectedObject &, bool processUnknown=true, bool dynamicTarget=true)
 
RexxMethodcheckPrivate (RexxMethod *, RexxErrorCodes &)
 
RexxMethodcheckPackage (RexxMethod *, RexxErrorCodes &)
 
void processUnknown (RexxErrorCodes, RexxString *, RexxObject **, size_t, size_t, ProtectedObject &)
 
void processProtectedMethod (RexxString *, RexxMethod *, RexxObject **, size_t, size_t, ProtectedObject &)
 
void sendMessage (RexxString *, RexxArray *, RexxDirectory *, ProtectedObject &)
 
void sendMessage (RexxString *message, RexxObject **args, size_t argCount, size_t named_argCount, ProtectedObject &result)
 
void sendMessage (RexxString *message, ProtectedObject &result)
 
void sendMessage (RexxString *message, RexxObject *argument1, ProtectedObject &result)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, ProtectedObject &)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, ProtectedObject &)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, ProtectedObject &)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, ProtectedObject &)
 
RexxObjectsendMessage (RexxString *, RexxArray *, RexxDirectory *=OREF_NULL)
 
RexxObjectsendMessage (RexxString *message, RexxObject **args, size_t argCount, size_t named_argCount)
 
RexxObjectsendMessage (RexxString *message)
 
RexxObjectsendMessage (RexxString *message, RexxObject *argument1)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, RexxObject *)
 
RexxObjectdefMethods (RexxDirectory *)
 
void setObjectVariable (RexxString *, RexxObject *, RexxObject *)
 
RexxObjectgetObjectVariable (RexxString *)
 
RexxObjectgetObjectVariable (RexxString *, RexxObject *)
 
void addObjectVariables (RexxVariableDictionary *)
 
void copyObjectVariables (RexxObject *newObject)
 
RexxObjectsuperScope (RexxObject *)
 
RexxMethodsuperMethod (RexxString *, RexxObject *)
 
RexxObjectmdict ()
 
RexxObjectsetMdict (RexxObject *)
 
RexxBehaviourbehaviourObject ()
 
const char * idString ()
 
RexxStringid ()
 
RexxMethodmethodLookup (RexxString *name)
 
RexxVariableDictionarygetObjectVariables (RexxObject *)
 
void guardOn (RexxActivity *activity, RexxObject *scope)
 
void guardOff (RexxActivity *activity, RexxObject *scope)
 
RexxObjectequal (RexxObject *)
 
RexxObjectnotEqual (RexxObject *other)
 
RexxObjectstrictEqual (RexxObject *)
 
RexxObjectstrictNotEqual (RexxObject *other)
 
RexxIntegeridentityHashRexx ()
 
RexxObjecthashCode ()
 
RexxStringstringRexx ()
 
RexxStringconcatRexx (RexxObject *)
 
RexxStringconcatBlank (RexxObject *)
 
RexxObjectmakeStringRexx ()
 
RexxObjectmakeArrayRexx ()
 
RexxStringdefaultNameRexx ()
 
RexxObjectcopyRexx ()
 
RexxObjectunknownRexx (RexxString *, RexxArray *, RexxObject **, size_t)
 
RexxObjecthasMethodRexx (RexxString *)
 
void * getCSelf ()
 
void * getCSelf (RexxObject *scope)
 
bool equalValue (RexxObject *other)
 
virtual wholenumber_t compareTo (RexxObject *)
 
 koper (operator_plus) koper(operator_minus) koper(operator_multiply) koper(operator_divide) koper(operator_integerDivide) koper(operator_remainder) koper(operator_power) koper(operator_abuttal) koper(operator_concat) koper(operator_concatBlank) koper(operator_equal) koper(operator_notEqual) koper(operator_isGreaterThan) koper(operator_isBackslashGreaterThan) koper(operator_isLessThan) koper(operator_isBackslashLessThan) koper(operator_isGreaterOrEqual) koper(operator_isLessOrEqual) koper(operator_strictEqual) koper(operator_strictNotEqual) koper(operator_strictGreaterThan) koper(operator_strictBackslashGreaterThan) koper(operator_strictLessThan) koper(operator_strictBackslashLessThan) koper(operator_strictGreaterOrEqual) koper(operator_strictLessOrEqual) koper(operator_lessThanGreaterThan) koper(operator_greaterThanLessThan) koper(operator_and) koper(operator_or) koper(operator_xor) koper(operator_not) RexxVariableDictionary *objectVariables
 
- Public Member Functions inherited from RexxInternalObject
void * operator new (size_t, RexxClass *)
 
void * operator new (size_t, RexxClass *, RexxObject **, size_t, size_t)
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *)
 
void operator delete (void *p, void *ptr)
 
 RexxInternalObject ()
 
 RexxInternalObject (RESTORETYPE restoreType)
 
virtual ~RexxInternalObject ()
 
 operator RexxObject * ()
 
size_t getObjectSize ()
 
void setObjectSize (size_t s)
 
size_t getObjectDataSize ()
 
void * getObjectDataSpace ()
 
void clearObject ()
 
void clearObject (size_t l)
 
void setVirtualFunctions (void *t)
 
void setInitHeader (size_t s, size_t markword)
 
void setInitHeader (size_t markword)
 
void setObjectLive (size_t markword)
 
void setHasReferences ()
 
void setHasNoReferences ()
 
bool hasReferences ()
 
bool hasNoReferences ()
 
void setPrimitive ()
 
void setNonPrimitive ()
 
bool isPrimitive ()
 
bool isNonPrimitive ()
 
void setInRexxPackage ()
 
bool isInRexxPackage ()
 
bool isObjectMarked (size_t markword)
 
void setObjectMark (size_t markword)
 
void clearObjectMark ()
 
bool isObjectLive (size_t mark)
 
bool isObjectDead (size_t mark)
 
bool isOldSpace ()
 
bool isNewSpace ()
 
void setNewSpace ()
 
void setOldSpace ()
 
void makeProxiedObject ()
 
bool isProxyObject ()
 
bool isSubClassOrEnhanced ()
 
bool isBaseClass ()
 
size_t getObjectTypeNumber ()
 
RexxBehaviourgetObjectType ()
 
bool isObjectType (RexxBehaviour *b)
 
bool isObjectType (size_t t)
 
bool isSameType (RexxInternalObject *o)
 
void setBehaviour (RexxBehaviour *b)
 
virtual RexxObjectmakeProxy (RexxEnvelope *)
 
virtual RexxObjectevaluate (RexxActivation *, RexxExpressionStack *)
 
virtual RexxObjectgetValue (RexxActivation *)
 
virtual RexxObjectgetValue (RexxVariableDictionary *)
 
virtual RexxObjectgetRealValue (RexxActivation *)
 
virtual RexxObjectgetRealValue (RexxVariableDictionary *)
 
virtual HashCode getHashValue ()
 
HashCode identityHash ()
 
virtual RexxStringprimitiveMakeString ()
 
virtual RexxTextprimitiveMakeText ()
 
virtual RexxObjectdynamicTarget (RexxObject **arguments, size_t count, size_t named_count)
 
void hasUninit ()
 
void removedUninit ()
 
void printObject ()
 
RexxObjectclone ()
 
- Public Member Functions inherited from RexxVirtualBase
virtual RexxObjectunflatten (RexxEnvelope *)
 

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 RexxClassclassInstance = OREF_NULL
 
- Static Public Attributes inherited from RexxObject
static PCPPM operatorMethods []
 
static RexxClassclassInstance = OREF_NULL
 

Protected Attributes

RexxStringstemName
 
RexxCompoundTable tails
 
RexxObjectvalue
 
bool dropped
 

Friends

class RexxCompoundTable
 

Additional Inherited Members

- Public Attributes inherited from RexxInternalObject
ObjectHeader header
 
RexxBehaviourbehaviour
 
- Protected Member Functions inherited from RexxVirtualBase
virtual ~RexxVirtualBase ()
 
virtual void baseVirtual ()
 

Detailed Description

Definition at line 70 of file StemClass.hpp.

Constructor & Destructor Documentation

◆ RexxStem() [1/2]

RexxStem::RexxStem ( RexxString name)

Definition at line 69 of file StemClass.cpp.

References ARG_ONE, dropped, RexxCompoundTable::init(), OREF_NULL, OrefSet, stemName, stringArgument(), tails, and value.

Referenced by newRexx().

◆ RexxStem() [2/2]

RexxStem::RexxStem ( RESTORETYPE  restoreType)
inline

Definition at line 76 of file StemClass.hpp.

Member Function Documentation

◆ allIndexes()

RexxArray * RexxStem::allIndexes ( void  )

Create an array of all indexes of the stem.

Returns
An array of all tail names used in the stem.

Definition at line 1011 of file StemClass.cpp.

References tailArray().

Referenced by RexxMemory::createImage().

◆ allItems()

RexxArray * RexxStem::allItems ( void  )

Return all items in the stem.

Returns
An array of all items in the stem.

Definition at line 913 of file StemClass.cpp.

References RexxCompoundTable::first(), RexxVariable::getVariableValue(), items(), new_array(), RexxCompoundTable::next(), OREF_NULL, RexxArray::put(), and tails.

Referenced by RexxMemory::createImage().

◆ arraycopy()

void RexxStem::arraycopy ( RexxString **  source,
size_t  start,
RexxString **  target,
size_t  index,
size_t  count 
)

copy segments of one array into another.

Parameters
sourceThe source array
startThe starting index of the source copy
targetThe target array
indexThe target copy index
countThe number of items to count.

Definition at line 1387 of file StemClass.cpp.

References index(), and RexxObject::start().

Referenced by merge().

◆ bracket()

RexxObject * RexxStem::bracket ( RexxObject **  tailElements,
size_t  argCount,
size_t  named_argCount 
)

Definition at line 236 of file StemClass.cpp.

References evaluateCompoundVariableValue(), OREF_NULL, stemName, and value.

Referenced by RexxMemory::createImage().

◆ bracketEqual()

RexxObject * RexxStem::bracketEqual ( RexxObject **  tailElements,
size_t  argCount,
size_t  named_argCount 
)

◆ compoundVariableExists()

bool RexxStem::compoundVariableExists ( RexxCompoundTail resolved_tail)
inline

Definition at line 138 of file StemClass.hpp.

References OREF_NULL, and realCompoundVariableValue().

Referenced by RexxActivation::localCompoundVariableExists().

◆ copy()

RexxObject * RexxStem::copy ( void  )
virtual

Reimplemented from RexxObject.

Definition at line 91 of file StemClass.cpp.

References RexxObject::copy(), copyFrom(), and tails.

◆ copyFrom()

void RexxStem::copyFrom ( RexxCompoundTable _tails)

Copy the tails from another stem object into this stem.

Parameters
_tailsThe source tail collection.

Definition at line 109 of file StemClass.cpp.

References RexxCompoundTable::copyFrom(), RexxCompoundTable::init(), and tails.

Referenced by copy().

◆ createCompoundName()

RexxString * RexxStem::createCompoundName ( RexxCompoundTail tailPart)

Create a full compound name from a constructed compound taile.

Parameters
tailPartThe constructed tail element.
Returns
The fully resolved string name of the element.

Definition at line 1219 of file StemClass.cpp.

References RexxCompoundTail::createCompoundName(), and stemName.

◆ createInstance()

void RexxStem::createInstance ( )
static

Create initial class object at bootstrap time.

Definition at line 63 of file StemClass.cpp.

References CLASS_CREATE.

Referenced by RexxMemory::createImage().

◆ doubleValue()

bool RexxStem::doubleValue ( double &  result)
virtual

Reimplemented from RexxObject.

Definition at line 483 of file StemClass.cpp.

References RexxObject::doubleValue(), and value.

◆ dropCompoundVariable()

void RexxStem::dropCompoundVariable ( RexxCompoundTail name)

◆ dropElement() [1/3]

void RexxStem::dropElement ( const char *  _tail)

Drop an array element for an API class.

Parameters
tailThe direct tail value.

Definition at line 1187 of file StemClass.cpp.

Referenced by dropElement().

◆ dropElement() [2/3]

void RexxStem::dropElement ( RexxCompoundTail resolved_tail)

Drop an element using a resolved tail value.

Parameters
resolved_tailThe target tail element.

Definition at line 1202 of file StemClass.cpp.

References RexxVariable::drop(), findCompoundVariable(), and OREF_NULL.

◆ dropElement() [3/3]

void RexxStem::dropElement ( size_t  _tail)

Drop an array element for an API class.

Parameters
tailThe direct tail value.

Definition at line 1174 of file StemClass.cpp.

References dropElement().

◆ dropValue()

void RexxStem::dropValue ( )

Definition at line 163 of file StemClass.cpp.

References dropped, OrefSet, stemName, and value.

◆ empty()

RexxObject * RexxStem::empty ( )

Empty the stem. This also clears dropped and exposed tails,

Returns
Nothing.

Definition at line 987 of file StemClass.cpp.

References RexxCompoundTable::clear(), OREF_NULL, and tails.

Referenced by RexxMemory::createImage().

◆ evaluateCompoundVariableValue()

◆ expose()

◆ exposeCompoundVariable()

◆ find()

size_t RexxStem::find ( SortData sd,
int(*)(SortData *, RexxString *, RexxString *)  comparator,
RexxString **  strings,
RexxString val,
int  limit,
size_t  left,
size_t  right 
)

Finds the place in the given range of specified sorted array, where the element should be inserted for getting sorted array. Uses exponential search algorithm.

Parameters
sdThe sort descriptor
comparatorThe comparator used to compare pairs of elements.
stringsThe input set of strings.
valobject to be inserted
bndpossible values 0,-1. "-1" - val is located at index more then elements equals to val. "0" - val is located at index less then elements equals to val.
leftThe left bound of the insert operation.
rightThe right bound for the insert.
Returns
The insertion point.

Definition at line 1412 of file StemClass.cpp.

Referenced by merge().

◆ findByValue()

RexxCompoundElement * RexxStem::findByValue ( RexxObject target)

Locate a stem item by value.

Returns
The compound item for the located element.

Definition at line 940 of file StemClass.cpp.

References RexxObject::equalValue(), RexxCompoundTable::first(), RexxVariable::getVariableValue(), RexxCompoundTable::next(), OREF_NULL, and tails.

Referenced by hasItem(), index(), and removeItem().

◆ findCompoundVariable()

◆ first()

RexxCompoundElement* RexxStem::first ( void  )
inline

Definition at line 140 of file StemClass.hpp.

References RexxCompoundTable::first(), and tails.

◆ flatten()

void RexxStem::flatten ( RexxEnvelope envelope)
virtual

Reimplemented from RexxObject.

Definition at line 138 of file StemClass.cpp.

References cleanUpFlatten, flatten_reference, flattenCompoundTable, and setUpFlatten.

◆ getCompoundVariable()

◆ getCompoundVariableRealValue()

RexxObject * RexxStem::getCompoundVariableRealValue ( RexxCompoundTail resolved_tail)

Evaluate the real value of a compound variable. The real value is either its explicitly assigned value or a stem assigned value. This returns OREF_NULL if neither is available. This does not raise NOVALUE conditions.

Parameters
resolved_tailThe target tail value.
Returns
The variable value, or OREF_NULL if the variable does not have an explicit value.

Definition at line 821 of file StemClass.cpp.

References dropped, findCompoundVariable(), RexxVariable::getVariableValue(), OREF_NULL, and value.

Referenced by RexxVariableDictionary::getCompoundVariableRealValue(), and RexxActivation::getLocalCompoundVariableRealValue().

◆ getCompoundVariableValue()

◆ getElement() [1/3]

RexxObject * RexxStem::getElement ( const char *  _tail)

Evaluate an array element for an API class.

Parameters
tailThe direct tail value.
Returns
The object value. If the stem element does not exist or has been dropped, this returns OREF_NULL.

Definition at line 1139 of file StemClass.cpp.

References getElement().

◆ getElement() [2/3]

RexxObject * RexxStem::getElement ( RexxCompoundTail resolved_tail)

Resolve a compound variable as a result of an api call.

Parameters
resolved_tailThe resolved tail value.
Returns
The variable value. Returns OREF_NULL if not assigned or dropped.

Definition at line 1156 of file StemClass.cpp.

References findCompoundVariable(), RexxVariable::getVariableValue(), and OREF_NULL.

◆ getElement() [3/3]

RexxObject * RexxStem::getElement ( size_t  _tail)

Evaluate an array element for an API class.

Parameters
tailThe direct tail value.
Returns
The object value. If the stem element does not exist or has been dropped, this returns OREF_NULL.

Definition at line 1123 of file StemClass.cpp.

Referenced by getElement().

◆ getName()

RexxString* RexxStem::getName ( )
inline

Definition at line 139 of file StemClass.hpp.

References stemName.

Referenced by remove().

◆ getStemValue()

RexxObject * RexxStem::getStemValue ( )

Retrieve the assigned stem value.

Returns
The default stem value.

Definition at line 179 of file StemClass.cpp.

References value.

◆ handleNovalue()

RexxObject * RexxStem::handleNovalue ( RexxActivation context,
RexxString name,
RexxObject defaultValue,
RexxCompoundElement variable 
)

Definition at line 871 of file StemClass.cpp.

References RexxActivation::handleNovalueEvent(), and OREF_NULL.

Referenced by evaluateCompoundVariableValue().

◆ hasIndex()

RexxObject * RexxStem::hasIndex ( RexxObject **  tailElements,
size_t  argCount,
size_t  named_argCount 
)

Test if this compound variable has a given index.

Parameters
tailsThe set of tail expressions.
argCountThe argument count
Returns
True if the fully resolved tail exists in the stem, false otherwise.

Definition at line 265 of file StemClass.cpp.

References findCompoundVariable(), RexxVariable::getVariableValue(), OREF_NULL, TheFalseObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ hasItem()

RexxObject * RexxStem::hasItem ( RexxObject target)

Search for any index that matches the target object.

Parameters
targetThe object of interest.
Returns
.true if the object is in the collection, .false otherwise.

Definition at line 330 of file StemClass.cpp.

References findByValue(), OREF_NULL, TheFalseObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ index()

RexxObject * RexxStem::index ( RexxObject target)

Return the index for a target item.

Parameters
targetThe target object.
Returns
The tail name for the match, or .nil if it was not found.

Definition at line 368 of file StemClass.cpp.

References findByValue(), RexxVariable::getName(), OREF_NULL, and TheNilObject.

Referenced by arraycopy(), and RexxMemory::createImage().

◆ init()

void RexxStem::init ( void  )
inline

Definition at line 142 of file StemClass.hpp.

References RexxCompoundTable::init(), and tails.

◆ integerValue()

RexxInteger * RexxStem::integerValue ( size_t  precision)
virtual

Reimplemented from RexxObject.

Definition at line 500 of file StemClass.cpp.

References RexxObject::integerValue(), and value.

◆ isEmpty()

RexxObject * RexxStem::isEmpty ( )

Test if the stem is empty.

Returns
True if the stem is empty, false otherwise.

Definition at line 999 of file StemClass.cpp.

References items(), TheFalseObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ items()

size_t RexxStem::items ( void  )

Get the count of non-dropped items in the stem.

Returns
The number of non-dropped items.

Definition at line 962 of file StemClass.cpp.

References RexxCompoundTable::first(), RexxVariable::getVariableValue(), RexxCompoundTable::next(), OREF_NULL, and tails.

Referenced by allItems(), isEmpty(), itemsRexx(), and tailArray().

◆ itemsRexx()

RexxObject * RexxStem::itemsRexx ( void  )

Return the number of items set in the collection.

Returns
The count of items in the collection, not counting the default value.

Definition at line 384 of file StemClass.cpp.

References items(), and new_integer().

Referenced by RexxMemory::createImage().

◆ live()

void RexxStem::live ( size_t  liveMark)
virtual

Reimplemented from RexxObject.

Definition at line 116 of file StemClass.cpp.

References markCompoundTable, memory_mark, stemName, and value.

◆ liveGeneral()

void RexxStem::liveGeneral ( int  reason)
virtual

Reimplemented from RexxObject.

Definition at line 127 of file StemClass.cpp.

References markGeneralCompoundTable, memory_mark_general, stemName, and value.

◆ makeArray()

RexxArray * RexxStem::makeArray ( void  )
virtual

Reimplemented from RexxObject.

Definition at line 434 of file StemClass.cpp.

References tailArray().

Referenced by request().

◆ merge()

void RexxStem::merge ( SortData sd,
int(*)(SortData *, RexxString *, RexxString *)  comparator,
RexxString **  strings,
RexxString **  working,
size_t  left,
size_t  mid,
size_t  right 
)

Perform a merge of two sort partitions.

Parameters
sdThe sort descriptor.
comparatorThe comparator used to compare elements.
stringsThe input strings.
workingA working array used for the merge operations.
leftThe left bound for the merge.
midThe midpoint for the merge.
rightThe right bound of merge (inclusive).

Definition at line 1319 of file StemClass.cpp.

References arraycopy(), and find().

Referenced by mergeSort().

◆ mergeSort()

void RexxStem::mergeSort ( SortData sd,
int(*)(SortData *, RexxString *, RexxString *)  comparator,
RexxString **  strings,
RexxString **  working,
size_t  left,
size_t  right 
)

The merge sort routine. This will partition the data in to two sections, mergesort each partition, then merge the two partitions together.

Parameters
sdThe sort information.
comparatorThe comparator object used for the compares.
stringsThe input set of strings.
workingThe working array (same size as the sorted array).
leftThe left bound of the partition.
rightThe right bounds of the parition.

Definition at line 1282 of file StemClass.cpp.

References merge().

Referenced by sort().

◆ newRexx()

◆ nextVariable()

◆ numberString()

RexxNumberString * RexxStem::numberString ( )
virtual

Reimplemented from RexxObject.

Definition at line 491 of file StemClass.cpp.

References RexxObject::numberString(), and value.

◆ numberValue() [1/2]

bool RexxStem::numberValue ( wholenumber_t result)
virtual

Reimplemented from RexxObject.

Definition at line 459 of file StemClass.cpp.

References RexxObject::numberValue(), and value.

◆ numberValue() [2/2]

bool RexxStem::numberValue ( wholenumber_t result,
size_t  precision 
)
virtual

Reimplemented from RexxObject.

Definition at line 451 of file StemClass.cpp.

References RexxObject::numberValue(), and value.

◆ operator new() [1/2]

void* RexxStem::operator new ( size_t  size,
void *  ptr 
)
inline

Definition at line 74 of file StemClass.hpp.

◆ operator new() [2/2]

void * RexxStem::operator new ( size_t  size)

Definition at line 571 of file StemClass.cpp.

References new_object(), and T_Stem.

◆ realCompoundVariableValue()

RexxObject * RexxStem::realCompoundVariableValue ( RexxCompoundTail resolved_tail)

◆ remove()

RexxObject * RexxStem::remove ( RexxObject **  tailElements,
size_t  argCount,
size_t  named_argCount 
)

Remove an item from the collection. This is essentially equivalent to a drop operation on the stem variable.

Parameters
tailsThe set of tail indexes.
argCountThe number of indexes.
Returns
The removed object. If nothing was removed, this returns .nil.

Definition at line 296 of file StemClass.cpp.

References RexxVariable::drop(), findCompoundVariable(), getName(), RexxVariable::getVariableValue(), OREF_NULL, OrefSet, TheNilObject, and value.

Referenced by RexxMemory::createImage().

◆ removeItem()

RexxObject * RexxStem::removeItem ( RexxObject target)

Remove an item from the collection.

Parameters
targetThe object of interest.
Returns
.true if the object is in the collection, .false otherwise.

Definition at line 345 of file StemClass.cpp.

References RexxVariable::drop(), findByValue(), RexxVariable::getVariableValue(), OREF_NULL, and TheNilObject.

Referenced by RexxMemory::createImage().

◆ request()

◆ setCompoundVariable()

◆ setElement() [1/2]

void RexxStem::setElement ( const char *  _tail,
RexxObject _value 
)

Set a single stem variable object using a simple string value tail as a result of an api call.

Parameters
tailThe index of the target value.
valueThe new value to assign.

Definition at line 1092 of file StemClass.cpp.

References getCompoundVariable(), and RexxVariable::set().

◆ setElement() [2/2]

void RexxStem::setElement ( size_t  _tail,
RexxObject _value 
)

Set a single stem variable object using a simple string value tail as a result of an api call.

Parameters
tailThe index of the target value.
valueThe new value to assign.

Definition at line 1107 of file StemClass.cpp.

References getCompoundVariable(), and RexxVariable::set().

◆ setValue()

void RexxStem::setValue ( RexxObject value)

Definition at line 153 of file StemClass.cpp.

References dropped, OrefSet, and value.

Referenced by RexxStemVariable::assign(), and RexxStemVariable::set().

◆ sort()

◆ stringValue()

RexxString * RexxStem::stringValue ( )
virtual

Reimplemented from RexxObject.

Definition at line 442 of file StemClass.cpp.

References RexxObject::stringValue(), and value.

◆ supplier()

RexxSupplier * RexxStem::supplier ( void  )

Create a supplier for the stem, returning the tail names as the indexes and the values as the items.

Returns
A supplier instance.

Definition at line 1023 of file StemClass.cpp.

References RexxCompoundTable::first(), RexxVariable::getName(), RexxVariable::getVariableValue(), new_array(), new_supplier(), RexxCompoundTable::next(), OREF_NULL, RexxArray::put(), and tails.

Referenced by RexxMemory::createImage().

◆ tail()

RexxString* RexxStem::tail ( RexxArray ,
size_t   
)

◆ tailArray()

◆ toDirectory()

RexxDirectory * RexxStem::toDirectory ( )

Create a directory from the stem. Each tail with an assigned value will be an entry within the directory.

Returns
A directory instance.

Definition at line 1066 of file StemClass.cpp.

References RexxCompoundTable::first(), RexxVariable::getName(), RexxVariable::getVariableValue(), new_directory(), RexxCompoundTable::next(), OREF_NULL, RexxDirectory::put(), and tails.

Referenced by RexxMemory::createImage().

◆ unknown()

◆ unsignedNumberValue() [1/2]

bool RexxStem::unsignedNumberValue ( stringsize_t result)
virtual

Reimplemented from RexxObject.

Definition at line 475 of file StemClass.cpp.

References RexxObject::unsignedNumberValue(), and value.

◆ unsignedNumberValue() [2/2]

bool RexxStem::unsignedNumberValue ( stringsize_t result,
size_t  precision 
)
virtual

Reimplemented from RexxObject.

Definition at line 467 of file StemClass.cpp.

References RexxObject::unsignedNumberValue(), and value.

Friends And Related Function Documentation

◆ RexxCompoundTable

friend class RexxCompoundTable
friend

Definition at line 71 of file StemClass.hpp.

Member Data Documentation

◆ classInstance

RexxClass * RexxStem::classInstance = OREF_NULL
static

Definition at line 154 of file StemClass.hpp.

◆ dropped

◆ stemName

◆ tails

◆ value


The documentation for this class was generated from the following files: