RexxBehaviour Class Reference

#include <RexxBehaviour.hpp>

Inheritance diagram for RexxBehaviour:
[legend]

Public Member Functions

void * operator new (size_t, size_t)
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *)
 
void operator delete (void *, size_t)
 
void operator delete (void *, void *)
 
 RexxBehaviour (size_t, PCPPM *)
 
 RexxBehaviour ()
 
 RexxBehaviour (RESTORETYPE restoreType)
 
void live (size_t)
 
void liveGeneral (int reason)
 
void flatten (RexxEnvelope *)
 
RexxObjectcopy ()
 
void copyBehaviour (RexxBehaviour *source)
 
RexxObjectdefine (RexxString *, RexxMethod *)
 
RexxMethoddefine (const char *, PCPPM, size_t, bool)
 
void addMethod (RexxString *, RexxMethod *)
 
void removeMethod (RexxString *)
 
RexxMethodmethodObject (RexxString *)
 
RexxMethodmethodLookup (RexxString *)
 
RexxMethodgetMethod (RexxString *)
 
RexxObjectdeleteMethod (RexxString *)
 
void restore (RexxBehaviour *)
 
RexxClassrestoreClass ()
 
RexxObjectsuperScope (RexxObject *)
 
RexxMethodsuperMethod (RexxString *, RexxObject *)
 
void setMethodDictionaryScope (RexxObject *)
 
RexxObjectsetScopes (RexxIdentityTable *)
 
RexxObjectaddScope (RexxObject *)
 
RexxObjectmergeScope (RexxObject *)
 
bool checkScope (RexxObject *)
 
void subclass (RexxBehaviour *)
 
RexxSuppliergetMethods (RexxObject *scope)
 
void resolveNonPrimitiveBehaviour ()
 
void merge (RexxBehaviour *)
 
void methodDictionaryMerge (RexxTable *)
 
RexxIdentityTablegetScopes ()
 
RexxTablegetMethodDictionary ()
 
void setMethodDictionary (RexxTable *m)
 
void setInstanceMethodDictionary (RexxTable *m)
 
RexxTablegetInstanceMethodDictionary ()
 
RexxClassgetOwningClass ()
 
void setOwningClass (RexxClass *c)
 
void setClassType (size_t n)
 
size_t getClassType ()
 
bool isPrimitive ()
 
bool isNonPrimitive ()
 
bool isNotResolved ()
 
bool isResolved ()
 
bool isEnhanced ()
 
bool isInternalClass ()
 
bool isTransientClass ()
 
void setResolved ()
 
void setNotResolved ()
 
void setEnhanced ()
 
void setNonPrimitive ()
 
void setInternalClass ()
 
void setTransientClass ()
 
RexxBehaviourgetSavedPrimitiveBehaviour ()
 
PCPPM getOperatorMethod (size_t index)
 
- 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 ()
 
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 void uninit ()
 
virtual HashCode hash ()
 
virtual HashCode getHashValue ()
 
HashCode identityHash ()
 
virtual bool truthValue (int)
 
virtual bool logicalValue (logical_t &)
 
virtual RexxStringmakeString ()
 
virtual void copyIntoTail (RexxCompoundTail *buffer)
 
virtual RexxStringprimitiveMakeString ()
 
virtual RexxArraymakeArray ()
 
virtual RexxStringstringValue ()
 
virtual RexxIntegerintegerValue (size_t)
 
virtual bool numberValue (wholenumber_t &result, size_t precision)
 
virtual bool numberValue (wholenumber_t &result)
 
virtual bool unsignedNumberValue (stringsize_t &result, size_t precision)
 
virtual bool unsignedNumberValue (stringsize_t &result)
 
virtual bool doubleValue (double &result)
 
virtual RexxNumberStringnumberString ()
 
virtual bool isEqual (RexxObject *)
 
virtual bool isInstanceOf (RexxClass *)
 
virtual RexxMethodinstanceMethod (RexxString *)
 
virtual RexxSupplierinstanceMethods (RexxClass *)
 
void hasUninit ()
 
void removedUninit ()
 
void printObject ()
 
RexxObjectclone ()
 
- Public Member Functions inherited from RexxVirtualBase
virtual RexxObjectunflatten (RexxEnvelope *)
 

Static Public Member Functions

static RexxBehaviourrestoreSavedPrimitiveBehaviour (RexxBehaviour *b)
 
static RexxBehaviourgetPrimitiveBehaviour (size_t index)
 
static PCPPMgetOperatorMethods (size_t index)
 
- Static Public Member Functions inherited from RexxInternalObject
static size_t getObjectHeaderSize ()
 

Static Public Attributes

static RexxBehaviour primitiveBehaviours []
 

Protected Types

enum  {
  NON_PRIMITIVE_BEHAVIOUR = 0x0001 , ENHANCED_OBJECT = 0x0002 , INTERNAL_CLASS = 0x0004 , TRANSIENT_CLASS = 0x0008 ,
  BEHAVIOUR_NOT_RESOLVED = 0x0010
}
 

Protected Attributes

uint16_t classType
 
uint16_t behaviourFlags
 
RexxIdentityTablescopes
 
RexxTablemethodDictionary
 
PCPPMoperatorMethods
 
RexxClassowningClass
 
RexxTableinstanceMethodDictionary
 

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 49 of file RexxBehaviour.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
NON_PRIMITIVE_BEHAVIOUR 
ENHANCED_OBJECT 
INTERNAL_CLASS 
TRANSIENT_CLASS 
BEHAVIOUR_NOT_RESOLVED 

Definition at line 150 of file RexxBehaviour.hpp.

Constructor & Destructor Documentation

◆ RexxBehaviour() [1/3]

◆ RexxBehaviour() [2/3]

RexxBehaviour::RexxBehaviour ( )
inline

Definition at line 59 of file RexxBehaviour.hpp.

◆ RexxBehaviour() [3/3]

RexxBehaviour::RexxBehaviour ( RESTORETYPE  restoreType)
inline

Definition at line 60 of file RexxBehaviour.hpp.

Member Function Documentation

◆ addMethod()

◆ addScope()

◆ checkScope()

◆ copy()

◆ copyBehaviour()

void RexxBehaviour::copyBehaviour ( RexxBehaviour source)

◆ define() [1/2]

RexxMethod * RexxBehaviour::define ( const char *  name,
PCPPM  entryPoint,
size_t  arguments,
bool  passNamedArgs 
)

Define a native kernel method on this behaviour.

Parameters
nameThe method name.
entryPointThe method entry point
argumentsThe argument definition.
passNamedArgsTrue if the named arguments must be passed.
Returns
The created method object.

Definition at line 242 of file RexxBehaviour.cpp.

References define(), RexxMemory::getGlobalName(), and CPPCode::resolveExportedMethod().

◆ define() [2/2]

◆ deleteMethod()

RexxObject * RexxBehaviour::deleteMethod ( RexxString messageName)

◆ flatten()

void RexxBehaviour::flatten ( RexxEnvelope envelope)
virtual

Reimplemented from RexxVirtualBase.

Definition at line 126 of file RexxBehaviour.cpp.

References cleanUpFlatten, flatten_reference, isNonPrimitive(), and setUpFlatten.

◆ getClassType()

◆ getInstanceMethodDictionary()

RexxTable* RexxBehaviour::getInstanceMethodDictionary ( )
inline

Definition at line 96 of file RexxBehaviour.hpp.

References instanceMethodDictionary.

Referenced by RexxObject::copy(), and RexxObject::defMethod().

◆ getMethod()

RexxMethod * RexxBehaviour::getMethod ( RexxString messageName)

Definition at line 387 of file RexxBehaviour.cpp.

References methodDictionary, OREF_NULL, and RexxTable::stringGet().

◆ getMethodDictionary()

◆ getMethods()

RexxSupplier * RexxBehaviour::getMethods ( RexxObject scope)

Extract from the method dictionary all methods defined with a given scope.

Parameters
scopeThe target scope. If null, then all methods are returned.
Returns
A supplier holding the names and methods with the target scope. This supplier can be empty.

Definition at line 562 of file RexxBehaviour.cpp.

References RexxHashTableCollection::first(), RexxHashTableCollection::index(), methodDictionary, new_array(), new_supplier(), OREF_NULL, RexxArray::put(), RexxHashTableCollection::supplier(), and RexxHashTableCollection::value().

Referenced by RexxObject::instanceMethods().

◆ getOperatorMethod()

PCPPM RexxBehaviour::getOperatorMethod ( size_t  index)
inline

Definition at line 142 of file RexxBehaviour.hpp.

References operatorMethods.

Referenced by callOperatorMethod().

◆ getOperatorMethods()

static PCPPM* RexxBehaviour::getOperatorMethods ( size_t  index)
inlinestatic

Definition at line 144 of file RexxBehaviour.hpp.

References getPrimitiveBehaviour(), and operatorMethods.

Referenced by resolveNonPrimitiveBehaviour().

◆ getOwningClass()

◆ getPrimitiveBehaviour()

◆ getSavedPrimitiveBehaviour()

RexxBehaviour* RexxBehaviour::getSavedPrimitiveBehaviour ( )
inline

◆ getScopes()

RexxIdentityTable* RexxBehaviour::getScopes ( )
inline

Definition at line 92 of file RexxBehaviour.hpp.

References scopes.

Referenced by RexxClass::createClassBehaviour(), RexxClass::newRexx(), and restore().

◆ isEnhanced()

bool RexxBehaviour::isEnhanced ( )
inline

Definition at line 106 of file RexxBehaviour.hpp.

References behaviourFlags, and ENHANCED_OBJECT.

Referenced by RexxObject::defaultName().

◆ isInternalClass()

bool RexxBehaviour::isInternalClass ( )
inline

Definition at line 107 of file RexxBehaviour.hpp.

References behaviourFlags, and INTERNAL_CLASS.

Referenced by getSavedPrimitiveBehaviour().

◆ isNonPrimitive()

bool RexxBehaviour::isNonPrimitive ( )
inline

◆ isNotResolved()

bool RexxBehaviour::isNotResolved ( )
inline

Definition at line 104 of file RexxBehaviour.hpp.

References BEHAVIOUR_NOT_RESOLVED, and behaviourFlags.

Referenced by resolveNonPrimitiveBehaviour().

◆ isPrimitive()

bool RexxBehaviour::isPrimitive ( )
inline

◆ isResolved()

bool RexxBehaviour::isResolved ( )
inline

Definition at line 105 of file RexxBehaviour.hpp.

References BEHAVIOUR_NOT_RESOLVED, and behaviourFlags.

◆ isTransientClass()

bool RexxBehaviour::isTransientClass ( )
inline

Definition at line 108 of file RexxBehaviour.hpp.

References behaviourFlags, and TRANSIENT_CLASS.

Referenced by RexxEnvelope::copyBuffer(), and RexxMemory::saveImageMark().

◆ live()

void RexxBehaviour::live ( size_t  liveMark)
virtual

Reimplemented from RexxVirtualBase.

Definition at line 88 of file RexxBehaviour.cpp.

References instanceMethodDictionary, memory_mark, methodDictionary, owningClass, and scopes.

◆ liveGeneral()

◆ merge()

void RexxBehaviour::merge ( RexxBehaviour source_behav)

◆ mergeScope()

RexxObject * RexxBehaviour::mergeScope ( RexxObject scope)

Definition at line 630 of file RexxBehaviour.cpp.

References addScope(), checkScope(), and OREF_NULL.

Referenced by RexxClass::createClassBehaviour().

◆ methodDictionaryMerge()

void RexxBehaviour::methodDictionaryMerge ( RexxTable sourceDictionary)

◆ methodLookup()

◆ methodObject()

RexxMethod * RexxBehaviour::methodObject ( RexxString messageName)

Definition at line 353 of file RexxBehaviour.cpp.

References ARG_ONE, methodLookup(), stringArgument(), and RexxString::upper().

◆ operator delete() [1/3]

void RexxBehaviour::operator delete ( void *  )
inline

Definition at line 54 of file RexxBehaviour.hpp.

◆ operator delete() [2/3]

void RexxBehaviour::operator delete ( void *  ,
size_t   
)
inline

Definition at line 55 of file RexxBehaviour.hpp.

◆ operator delete() [3/3]

void RexxBehaviour::operator delete ( void *  ,
void *   
)
inline

Definition at line 56 of file RexxBehaviour.hpp.

◆ operator new() [1/2]

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

Definition at line 53 of file RexxBehaviour.hpp.

◆ operator new() [2/2]

void * RexxBehaviour::operator new ( size_t  size,
size_t  typenum 
)

Definition at line 463 of file RexxBehaviour.cpp.

◆ removeMethod()

void RexxBehaviour::removeMethod ( RexxString methodName)

◆ resolveNonPrimitiveBehaviour()

void RexxBehaviour::resolveNonPrimitiveBehaviour ( )

Do fix ups for non-primitive behaviours, ensuring they get all of the appropriate information from their parent primitive behaviour types.

Definition at line 153 of file RexxBehaviour.cpp.

References getClassType(), getOperatorMethods(), isNotResolved(), operatorMethods, and setResolved().

Referenced by liveGeneral(), and RexxEnvelope::puff().

◆ restore()

◆ restoreClass()

RexxClass * RexxBehaviour::restoreClass ( )

Definition at line 448 of file RexxBehaviour.cpp.

References owningClass, and RexxClass::setInstanceBehaviour().

◆ restoreSavedPrimitiveBehaviour()

static RexxBehaviour* RexxBehaviour::restoreSavedPrimitiveBehaviour ( RexxBehaviour b)
inlinestatic

◆ setClassType()

void RexxBehaviour::setClassType ( size_t  n)
inline

Definition at line 100 of file RexxBehaviour.hpp.

References classType.

Referenced by RexxBehaviour(), and subclass().

◆ setEnhanced()

void RexxBehaviour::setEnhanced ( )
inline

Definition at line 111 of file RexxBehaviour.hpp.

References behaviourFlags, and ENHANCED_OBJECT.

Referenced by RexxClass::enhanced().

◆ setInstanceMethodDictionary()

void RexxBehaviour::setInstanceMethodDictionary ( RexxTable m)
inline

Definition at line 95 of file RexxBehaviour.hpp.

References instanceMethodDictionary, and OrefSet.

Referenced by RexxClass::enhanced().

◆ setInternalClass()

void RexxBehaviour::setInternalClass ( )
inline

Definition at line 113 of file RexxBehaviour.hpp.

References behaviourFlags, and INTERNAL_CLASS.

◆ setMethodDictionary()

void RexxBehaviour::setMethodDictionary ( RexxTable m)
inline

◆ setMethodDictionaryScope()

void RexxBehaviour::setMethodDictionaryScope ( RexxObject scope)

◆ setNonPrimitive()

void RexxBehaviour::setNonPrimitive ( )
inline

Definition at line 112 of file RexxBehaviour.hpp.

References behaviourFlags, and NON_PRIMITIVE_BEHAVIOUR.

Referenced by copy(), and RexxMemory::saveImageMark().

◆ setNotResolved()

void RexxBehaviour::setNotResolved ( )
inline

Definition at line 110 of file RexxBehaviour.hpp.

References BEHAVIOUR_NOT_RESOLVED, and behaviourFlags.

Referenced by liveGeneral().

◆ setOwningClass()

void RexxBehaviour::setOwningClass ( RexxClass c)
inline

◆ setResolved()

void RexxBehaviour::setResolved ( )
inline

Definition at line 109 of file RexxBehaviour.hpp.

References BEHAVIOUR_NOT_RESOLVED, and behaviourFlags.

Referenced by resolveNonPrimitiveBehaviour().

◆ setScopes()

◆ setTransientClass()

void RexxBehaviour::setTransientClass ( )
inline

Definition at line 114 of file RexxBehaviour.hpp.

References behaviourFlags, and TRANSIENT_CLASS.

◆ subclass()

void RexxBehaviour::subclass ( RexxBehaviour subclass_behaviour)

Definition at line 417 of file RexxBehaviour.cpp.

References getClassType(), and setClassType().

Referenced by RexxClass::subclass().

◆ superMethod()

RexxMethod * RexxBehaviour::superMethod ( RexxString messageName,
RexxObject startScope 
)

◆ superScope()

RexxObject * RexxBehaviour::superScope ( RexxObject start_scope)

Member Data Documentation

◆ behaviourFlags

◆ classType

uint16_t RexxBehaviour::classType
protected

Definition at line 160 of file RexxBehaviour.hpp.

Referenced by getClassType(), and setClassType().

◆ instanceMethodDictionary

RexxTable* RexxBehaviour::instanceMethodDictionary
protected

◆ methodDictionary

◆ operatorMethods

PCPPM* RexxBehaviour::operatorMethods
protected

◆ owningClass

RexxClass* RexxBehaviour::owningClass
protected

◆ primitiveBehaviours

RexxBehaviour RexxBehaviour::primitiveBehaviours
static

◆ scopes


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