RexxClass Class Reference

#include <ClassClass.hpp>

Inheritance diagram for RexxClass:
[legend]

Public Member Functions

void * operator new (size_t, size_t, const char *, RexxBehaviour *, RexxBehaviour *)
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *)
 
void operator delete (void *, void *)
 
void operator delete (void *, size_t, const char *, RexxBehaviour *, RexxBehaviour *)
 
 RexxClass ()
 
 RexxClass (RESTORETYPE restoreType)
 
void live (size_t)
 
void liveGeneral (int reason)
 
void flatten (RexxEnvelope *)
 
RexxObjectunflatten (RexxEnvelope *)
 
RexxObjectmakeProxy (RexxEnvelope *)
 
bool isEqual (RexxObject *)
 
HashCode hash ()
 
HashCode getHashValue ()
 
RexxObjectequal (RexxObject *)
 
RexxObjectstrictEqual (RexxObject *)
 
RexxObjectnotEqual (RexxObject *)
 
RexxObjectsetRexxDefined ()
 
RexxIntegerqueryMixinClass ()
 
RexxObjectisMetaClassRexx ()
 
RexxObjectisAbstractRexx ()
 
RexxStringgetId ()
 
RexxClassgetBaseClass ()
 
RexxClassgetMetaClass ()
 
RexxClassgetSuperClass ()
 
RexxArraygetSuperClasses ()
 
RexxArraygetClassSuperClasses ()
 
RexxArraygetSubClasses ()
 
void defmeths (RexxTable *)
 
void setInstanceBehaviour (RexxBehaviour *)
 
RexxTablegetInstanceBehaviourDictionary ()
 
RexxTablegetBehaviourDictionary ()
 
RexxStringdefaultName ()
 
void subClassable (bool)
 
void subClassable (RexxClass *superClass, bool restricted)
 
void mergeSuperClassScopes (RexxBehaviour *target_instance_behaviour)
 
RexxObjectdefineMethod (RexxString *, RexxMethod *)
 
RexxObjectdefineMethods (RexxTable *)
 
RexxObjectdeleteMethod (RexxString *)
 
RexxObjectdefineClassMethod (RexxString *method_name, RexxMethod *newMethod)
 
void removeClassMethod (RexxString *method_name)
 
RexxMethodmethod (RexxString *)
 
RexxSuppliermethods (RexxClass *)
 
void updateSubClasses ()
 
void updateInstanceSubClasses ()
 
void createClassBehaviour (RexxBehaviour *)
 
void createInstanceBehaviour (RexxBehaviour *)
 
void methodDictionaryMerge (RexxTable *, RexxTable *)
 
RexxTablemethodDictionaryCreate (RexxTable *, RexxClass *)
 
RexxObjectinherit (RexxClass *, RexxClass *)
 
RexxObjectuninherit (RexxClass *)
 
RexxObjectenhanced (RexxObject **, size_t, size_t)
 
RexxClassmixinclass (PackageClass *, RexxString *, RexxClass *, RexxTable *)
 
RexxClasssubclass (PackageClass *, RexxString *, RexxClass *, RexxTable *)
 
RexxClassmixinClassRexx (RexxString *, RexxClass *, RexxObject *)
 
RexxClasssubclassRexx (RexxString *, RexxClass *, RexxObject *)
 
RexxClassnewRexx (RexxObject **args, size_t argCount, size_t named_argCount)
 
void setMetaClass (RexxClass *)
 
bool isCompatibleWith (RexxClass *other)
 
RexxObjectisSubclassOf (RexxClass *other)
 
RexxStringdefaultNameRexx ()
 
void setPackage (PackageClass *s)
 
PackageClassgetPackage ()
 
void completeNewObject (RexxObject *obj, RexxObject **initArgs=OREF_NULL, size_t argCount=0)
 
bool isRexxDefined ()
 
bool isMixinClass ()
 
bool isMetaClass ()
 
bool isAbstract ()
 
bool hasUninitDefined ()
 
void setHasUninitDefined ()
 
void clearHasUninitDefined ()
 
void setInitialFlagState ()
 
bool parentHasUninitDefined ()
 
void setParentHasUninitDefined ()
 
bool isPrimitiveClass ()
 
void setMixinClass ()
 
void setNonPrimitive ()
 
RexxBehaviourgetInstanceBehaviour ()
 
void setMetaClass ()
 
void setAbstract ()
 
void clearAbstract ()
 
void addSubClass (RexxClass *)
 
void removeSubclass (RexxClass *c)
 
void checkAbstract ()
 
void makeAbstract ()
 
- 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 RexxObjectunknown (RexxString *msg, RexxArray *args, RexxDirectory *named_args)
 
virtual RexxIntegerhasMethod (RexxString *msg)
 
bool hasUninitMethod ()
 
RexxObjectinit ()
 
void uninit ()
 
RexxObjectcopy ()
 
bool truthValue (int)
 
virtual bool logicalValue (logical_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)
 
RexxNumberStringnumberString ()
 
RexxIntegerintegerValue (size_t)
 
RexxStringmakeString ()
 
RexxTextmakeText ()
 
void copyIntoTail (RexxCompoundTail *buffer)
 
RexxArraymakeArray ()
 
RexxStringstringValue ()
 
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 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 RexxObjectevaluate (RexxActivation *, RexxExpressionStack *)
 
virtual RexxObjectgetValue (RexxActivation *)
 
virtual RexxObjectgetValue (RexxVariableDictionary *)
 
virtual RexxObjectgetRealValue (RexxActivation *)
 
virtual RexxObjectgetRealValue (RexxVariableDictionary *)
 
HashCode identityHash ()
 
virtual RexxStringprimitiveMakeString ()
 
virtual RexxTextprimitiveMakeText ()
 
virtual RexxObjectdynamicTarget (RexxObject **arguments, size_t count, size_t named_count)
 
void hasUninit ()
 
void removedUninit ()
 
void printObject ()
 
RexxObjectclone ()
 

Static Public Member Functions

static void processNewArgs (RexxObject **, size_t, RexxObject ***, size_t *, size_t, RexxObject **, RexxObject **)
 
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 Types

enum  {
  REXX_DEFINED = 0x00000001 , MIXIN = 0x00000004 , HAS_UNINIT = 0x00000008 , META_CLASS = 0x00000010 ,
  PRIMITIVE_CLASS = 0x00000020 , PARENT_HAS_UNINIT = 0x00000040 , ABSTRACT = 0x00000080
}
 

Protected Attributes

RexxStringid
 
RexxTableclassMethodDictionary
 
RexxBehaviourinstanceBehaviour
 
RexxTableinstanceMethodDictionary
 
RexxClassbaseClass
 
RexxArraymetaClass
 
RexxArraymetaClassMethodDictionary
 
RexxIdentityTablemetaClassScopes
 
RexxArrayclassSuperClasses
 
RexxArrayinstanceSuperClasses
 
uint32_t classFlags
 
RexxListsubClasses
 
PackageClasspackage
 

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 ClassClass.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
REXX_DEFINED 
MIXIN 
HAS_UNINIT 
META_CLASS 
PRIMITIVE_CLASS 
PARENT_HAS_UNINIT 
ABSTRACT 

Definition at line 151 of file ClassClass.hpp.

Constructor & Destructor Documentation

◆ RexxClass() [1/2]

RexxClass::RexxClass ( )
inline

Definition at line 57 of file ClassClass.hpp.

◆ RexxClass() [2/2]

RexxClass::RexxClass ( RESTORETYPE  restoreType)
inline

Definition at line 58 of file ClassClass.hpp.

Member Function Documentation

◆ addSubClass()

void RexxClass::addSubClass ( RexxClass subClass)

Definition at line 367 of file ClassClass.cpp.

References RexxList::addFirst(), and subClasses.

Referenced by inherit(), subclass(), and subClassable().

◆ checkAbstract()

◆ clearAbstract()

void RexxClass::clearAbstract ( )
inline

Definition at line 138 of file ClassClass.hpp.

References ABSTRACT, and classFlags.

Referenced by newRexx().

◆ clearHasUninitDefined()

void RexxClass::clearHasUninitDefined ( )
inline

Definition at line 127 of file ClassClass.hpp.

References classFlags, and HAS_UNINIT.

◆ completeNewObject()

void RexxClass::completeNewObject ( RexxObject obj,
RexxObject **  initArgs = OREF_NULL,
size_t  argCount = 0 
)

◆ createClassBehaviour()

◆ createInstance()

void RexxClass::createInstance ( )
static

◆ createInstanceBehaviour()

◆ defaultName()

RexxString * RexxClass::defaultName ( )
virtual

Reimplemented from RexxObject.

Definition at line 403 of file ClassClass.cpp.

References RexxString::concatToCstring(), RexxString::concatWithCstring(), and id.

Referenced by defaultNameRexx().

◆ defaultNameRexx()

RexxString * RexxClass::defaultNameRexx ( )

Definition at line 1653 of file ClassClass.cpp.

References defaultName().

Referenced by RexxMemory::createImage().

◆ defineClassMethod()

RexxObject * RexxClass::defineClassMethod ( RexxString method_name,
RexxMethod newMethod 
)

special method to allow a class method to be added to a primitive class during image build. New JLF : also used for ::EXTENSION

Parameters
method_nameThe name of the new method.
newMethodThe method object to add
Returns
always returns OREF_NULL

Definition at line 772 of file ClassClass.cpp.

References ARG_ONE, ARG_TWO, RexxInternalObject::behaviour, classMethodDictionary, defineClassMethod(), RexxArray::get(), RexxBehaviour::getMethodDictionary(), getSubClasses(), RexxMethod::newScope(), OREF_NULL, requiredArgument(), RexxArray::size(), RexxTable::stringAdd(), stringArgument(), RexxTable::stringPut(), subclass(), and RexxString::upper().

Referenced by RexxMemory::createImage(), defineClassMethod(), and ExtensionDirective::install().

◆ defineMethod()

◆ defineMethods()

◆ defmeths()

◆ deleteMethod()

◆ enhanced()

◆ equal()

◆ flatten()

void RexxClass::flatten ( RexxEnvelope envelope)
virtual

Reimplemented from RexxObject.

Definition at line 112 of file ClassClass.cpp.

◆ getBaseClass()

RexxClass * RexxClass::getBaseClass ( )

Definition at line 301 of file ClassClass.cpp.

References baseClass.

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

◆ getBehaviourDictionary()

RexxTable * RexxClass::getBehaviourDictionary ( )

◆ getClassSuperClasses()

RexxArray* RexxClass::getClassSuperClasses ( )
inline

Definition at line 81 of file ClassClass.hpp.

References classSuperClasses.

◆ getHashValue()

HashCode RexxClass::getHashValue ( )
virtual

Get the primitive hash value of this String object.

Returns
The calculated string hash for the string.

Reimplemented from RexxInternalObject.

Definition at line 163 of file ClassClass.cpp.

Referenced by hash().

◆ getId()

◆ getInstanceBehaviour()

◆ getInstanceBehaviourDictionary()

RexxTable * RexxClass::getInstanceBehaviourDictionary ( )

◆ getMetaClass()

RexxClass * RexxClass::getMetaClass ( )

Definition at line 309 of file ClassClass.cpp.

References RexxArray::get(), isPrimitiveClass(), metaClass, and TheClassClass.

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

◆ getPackage()

PackageClass * RexxClass::getPackage ( )

Return the package containing the directive that defined a class.

Returns
The package containing the directive that defined this class, or .nil if this class was not created from a directive.

Definition at line 1683 of file ClassClass.cpp.

References RexxInternalObject::isInRexxPackage(), package, resultOrNil(), and TheRexxPackage.

Referenced by RexxMemory::createImage().

◆ getSubClasses()

◆ getSuperClass()

RexxClass * RexxClass::getSuperClass ( )

Definition at line 333 of file ClassClass.cpp.

References RexxArray::get(), instanceSuperClasses, TheNilObject, and TheObjectClass.

Referenced by RexxMemory::createImage().

◆ getSuperClasses()

RexxArray * RexxClass::getSuperClasses ( )

Definition at line 348 of file ClassClass.cpp.

References RexxArray::copy(), and instanceSuperClasses.

Referenced by RexxMemory::createImage().

◆ hash()

HashCode RexxClass::hash ( )
virtual

Hash a class object. Because behaviors don't always get set up properly with this, we'll always use the primitive one for class objects.

Returns
A "hashed hash" that can be used by the map collections.

Reimplemented from RexxObject.

Definition at line 149 of file ClassClass.cpp.

References getHashValue().

◆ hasUninitDefined()

◆ inherit()

◆ isAbstract()

bool RexxClass::isAbstract ( )
inline

Definition at line 124 of file ClassClass.hpp.

References ABSTRACT, and classFlags.

Referenced by checkAbstract(), and isAbstractRexx().

◆ isAbstractRexx()

RexxObject * RexxClass::isAbstractRexx ( )

Test if this class is marked as abstract

Returns
True if this is abstract, false if not

Definition at line 278 of file ClassClass.cpp.

References booleanObject(), and isAbstract().

Referenced by RexxMemory::createImage().

◆ isCompatibleWith()

bool RexxClass::isCompatibleWith ( RexxClass other)

Test if the target class is a "compatible" with the argument class. To be compatible, the target class must either A) be the same class, B) be a direct subclass of the argument class, or C) inherit the argument class as a mixin. This rule gets applied recursively down the hierarchy.

Parameters
otherThe comparison class.
Returns
True if the two classes are compatible, false otherwise.

Definition at line 1615 of file ClassClass.cpp.

References RexxArray::get(), instanceSuperClasses, OREF_NULL, and RexxArray::size().

Referenced by RexxObject::isInstanceOf(), and isSubclassOf().

◆ isEqual()

◆ isMetaClass()

bool RexxClass::isMetaClass ( )
inline

Definition at line 123 of file ClassClass.hpp.

References classFlags, and META_CLASS.

Referenced by createClassBehaviour(), isMetaClassRexx(), makeAbstract(), and subclass().

◆ isMetaClassRexx()

RexxObject * RexxClass::isMetaClassRexx ( )

Test if a class can be used as a metaclass

Returns
True if this is a metaclass, False if not.

Definition at line 267 of file ClassClass.cpp.

References booleanObject(), and isMetaClass().

Referenced by RexxMemory::createImage().

◆ isMixinClass()

bool RexxClass::isMixinClass ( )
inline

Definition at line 122 of file ClassClass.hpp.

References classFlags, and MIXIN.

Referenced by inherit(), and queryMixinClass().

◆ isPrimitiveClass()

bool RexxClass::isPrimitiveClass ( )
inline

Definition at line 132 of file ClassClass.hpp.

References classFlags, and PRIMITIVE_CLASS.

Referenced by getMetaClass(), and newRexx().

◆ isRexxDefined()

bool RexxClass::isRexxDefined ( )
inline

Definition at line 121 of file ClassClass.hpp.

References classFlags, and REXX_DEFINED.

Referenced by defineMethod(), deleteMethod(), inherit(), and uninherit().

◆ isSubclassOf()

RexxObject * RexxClass::isSubclassOf ( RexxClass other)

A stub to test compatibility of two classes.

Parameters
otherThe class for the superclass test.
Returns
True if the class is a subclass of the argument class (or IS the argument class).

Definition at line 1647 of file ClassClass.cpp.

References ARG_ONE, isCompatibleWith(), requiredArgument(), TheFalseObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ live()

◆ liveGeneral()

◆ makeAbstract()

void RexxClass::makeAbstract ( )

Mark a class as abstract, if this is allowed for this type of class.

Definition at line 1708 of file ClassClass.cpp.

References Error_Execution_abstract_metaclass, isMetaClass(), reportException(), and setAbstract().

Referenced by ClassDirective::install().

◆ makeProxy()

RexxObject * RexxClass::makeProxy ( RexxEnvelope envelope)
virtual

Reimplemented from RexxInternalObject.

Definition at line 128 of file ClassClass.cpp.

References RexxString::getStringData(), id, and new_proxy().

◆ mergeSuperClassScopes()

void RexxClass::mergeSuperClassScopes ( RexxBehaviour target_instance_behaviour)

Merge the scopes from the superclasses into a target primitive class.

Parameters
target_instance_behaviourThe target behavior to update.

Definition at line 1088 of file ClassClass.cpp.

References RexxBehaviour::addScope(), RexxBehaviour::checkScope(), RexxArray::get(), instanceBehaviour, instanceSuperClasses, RexxBehaviour::merge(), mergeSuperClassScopes(), RexxArray::size(), and TheNilObject.

Referenced by mergeSuperClassScopes(), and subClassable().

◆ method()

◆ methodDictionaryCreate()

◆ methodDictionaryMerge()

◆ methods()

◆ mixinclass()

RexxClass * RexxClass::mixinclass ( PackageClass package,
RexxString mixin_id,
RexxClass meta_class,
RexxTable enhancing_class_methods 
)

◆ mixinClassRexx()

RexxClass * RexxClass::mixinClassRexx ( RexxString class_id,
RexxClass meta_class,
RexxObject enhancing_class_methods 
)

Create a mixinclass of a class directly from Rexx code.

Parameters
class_idThe id of the created class.
meta_classThe meta class to create this from.
enhancing_class_methodsAdditional class methods.
Returns
A created class object.

Definition at line 1423 of file ClassClass.cpp.

References mixinclass(), and OREF_NULL.

Referenced by RexxMemory::createImage().

◆ newRexx()

◆ notEqual()

RexxObject * RexxClass::notEqual ( RexxObject other)

◆ operator delete() [1/3]

void RexxClass::operator delete ( void *  )
inline

Definition at line 53 of file ClassClass.hpp.

◆ operator delete() [2/3]

void RexxClass::operator delete ( void *  ,
size_t  ,
const char *  ,
RexxBehaviour ,
RexxBehaviour  
)
inline

Definition at line 55 of file ClassClass.hpp.

◆ operator delete() [3/3]

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

Definition at line 54 of file ClassClass.hpp.

◆ operator new() [1/2]

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

Definition at line 52 of file ClassClass.hpp.

◆ operator new() [2/2]

void * RexxClass::operator new ( size_t  size,
size_t  size1,
const char *  className,
RexxBehaviour class_behaviour,
RexxBehaviour instanceBehaviour 
)

◆ parentHasUninitDefined()

bool RexxClass::parentHasUninitDefined ( )
inline

Definition at line 130 of file ClassClass.hpp.

References classFlags, and PARENT_HAS_UNINIT.

Referenced by inherit(), mixinclass(), and subclass().

◆ processNewArgs()

void RexxClass::processNewArgs ( RexxObject **  arg_array,
size_t  argCount,
RexxObject ***  init_args,
size_t *  remainderSize,
size_t  required,
RexxObject **  argument1,
RexxObject **  argument2 
)
static

Perform common initialization steps on an object created by a new method from Rexx. This handles subclass behaviour issues, uninit processing, etc.

Parameters
objThe newly created object. NOTE: this assumes the caller has protected this object from garbage collection.
initArgsA pointer to arguments intended for the INIT method.
argCountThe count of arguments.

Definition at line 1920 of file ClassClass.cpp.

References OREF_NULL.

Referenced by RexxMethod::newRexx(), RoutineClass::newRexx(), RexxStem::newRexx(), RexxString::newRexx(), WeakReference::newRexx(), and PackageClass::newRexx().

◆ queryMixinClass()

RexxInteger * RexxClass::queryMixinClass ( )

Definition at line 253 of file ClassClass.cpp.

References isMixinClass(), TheFalseObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ removeClassMethod()

void RexxClass::removeClassMethod ( RexxString method_name)

Remove a class method from a class and all of its class methods.

Parameters
method_nameThe target method name.

Definition at line 803 of file ClassClass.cpp.

References RexxInternalObject::behaviour, RexxBehaviour::deleteMethod(), RexxArray::get(), getSubClasses(), removeClassMethod(), RexxArray::size(), and subclass().

Referenced by removeClassMethod().

◆ removeSubclass()

void RexxClass::removeSubclass ( RexxClass c)

Remove a subclass from the uninherit list after an uninherit operation.

Parameters
cThe class to remove.

Definition at line 1349 of file ClassClass.cpp.

References RexxList::firstIndex(), WeakReference::get(), RexxList::getValue(), LIST_END, RexxList::nextIndex(), RexxList::removeIndex(), and subClasses.

Referenced by uninherit().

◆ setAbstract()

void RexxClass::setAbstract ( )
inline

Definition at line 137 of file ClassClass.hpp.

References ABSTRACT, and classFlags.

Referenced by makeAbstract().

◆ setHasUninitDefined()

void RexxClass::setHasUninitDefined ( )
inline

Definition at line 126 of file ClassClass.hpp.

References classFlags, and HAS_UNINIT.

Referenced by defineMethod(), defineMethods(), methodDictionaryMerge(), newRexx(), and subclass().

◆ setInitialFlagState()

void RexxClass::setInitialFlagState ( )
inline

Definition at line 129 of file ClassClass.hpp.

References classFlags, and HAS_UNINIT.

Referenced by newRexx().

◆ setInstanceBehaviour()

void RexxClass::setInstanceBehaviour ( RexxBehaviour b)

Definition at line 324 of file ClassClass.cpp.

References instanceBehaviour, and OrefSet.

Referenced by RexxBehaviour::restoreClass().

◆ setMetaClass() [1/2]

void RexxClass::setMetaClass ( )
inline

Definition at line 136 of file ClassClass.hpp.

References classFlags, and META_CLASS.

Referenced by subClassable().

◆ setMetaClass() [2/2]

◆ setMixinClass()

void RexxClass::setMixinClass ( )
inline

Definition at line 133 of file ClassClass.hpp.

References classFlags, and MIXIN.

Referenced by mixinclass().

◆ setNonPrimitive()

void RexxClass::setNonPrimitive ( )
inline

Definition at line 134 of file ClassClass.hpp.

References classFlags, and PRIMITIVE_CLASS.

◆ setPackage()

void RexxClass::setPackage ( PackageClass s)

Set the source object what a class was created in. This will be the source that contains the ::class directive that defined the class.

Parameters
sThe package file containing the ::class directive that created this class.

Definition at line 1670 of file ClassClass.cpp.

References OrefSet, and package.

Referenced by subclass().

◆ setParentHasUninitDefined()

void RexxClass::setParentHasUninitDefined ( )
inline

Definition at line 131 of file ClassClass.hpp.

References classFlags, and PARENT_HAS_UNINIT.

Referenced by inherit(), mixinclass(), and subclass().

◆ setRexxDefined()

RexxObject * RexxClass::setRexxDefined ( void  )

Definition at line 292 of file ClassClass.cpp.

References classFlags, OREF_NULL, and REXX_DEFINED.

Referenced by RexxMemory::createImage().

◆ strictEqual()

RexxObject * RexxClass::strictEqual ( RexxObject other)

Definition at line 172 of file ClassClass.cpp.

References equal().

Referenced by RexxMemory::createImage().

◆ subclass()

◆ subClassable() [1/2]

void RexxClass::subClassable ( bool  restricted)

Initialize a base Rexx class.

Parameters
restrictedWhether we should turn the RexxRestricted flag on at this time. Some classes get additional customization after initial creation, so we delay setting this attribute until the class is fully constructed.

Definition at line 462 of file ClassClass.cpp.

References RexxArray::addLast(), RexxBehaviour::addScope(), baseClass, RexxInternalObject::behaviour, classFlags, classMethodDictionary, classSuperClasses, getBehaviourDictionary(), getInstanceBehaviourDictionary(), instanceBehaviour, instanceMethodDictionary, instanceSuperClasses, RexxBehaviour::merge(), metaClass, metaClassMethodDictionary, metaClassScopes, new_array(), new_list(), OrefSet, PRIMITIVE_CLASS, setMetaClass(), RexxBehaviour::setOwningClass(), subClasses, TheClassBehaviour, TheClassClass, TheIntegerClass, TheNumberStringClass, TheObjectBehaviour, and TheObjectClass.

◆ subClassable() [2/2]

void RexxClass::subClassable ( RexxClass superClass,
bool  restricted 
)

Initialize a base Rexx class that inherits from a primitive class other than Object.

Parameters
superClassThe immediate superclass of the created class.
restrictedWhether we should turn the RexxRestricted flag on at this time. Some classes get additional customization after initial creation, so we delay setting this attribute until the class is fully constructed.

Definition at line 594 of file ClassClass.cpp.

References RexxBehaviour::addScope(), addSubClass(), baseClass, RexxInternalObject::behaviour, classFlags, classMethodDictionary, classSuperClasses, getBehaviourDictionary(), getInstanceBehaviourDictionary(), instanceBehaviour, instanceMethodDictionary, instanceSuperClasses, RexxBehaviour::merge(), mergeSuperClassScopes(), metaClass, metaClassMethodDictionary, metaClassScopes, new_array(), new_list(), OrefSet, PRIMITIVE_CLASS, RexxBehaviour::setOwningClass(), subClasses, TheClassBehaviour, TheClassClass, and TheObjectClass.

◆ subclassRexx()

RexxClass * RexxClass::subclassRexx ( RexxString class_id,
RexxClass meta_class,
RexxObject enhancing_class_methods 
)

Create a subclass of a class directly from Rexx code.

Parameters
class_idThe id of the created class.
meta_classThe meta class to create this from.
enhancing_class_methodsAdditional class methods.
Returns
A created class object.

Definition at line 1466 of file ClassClass.cpp.

References OREF_NULL, and subclass().

Referenced by RexxMemory::createImage().

◆ unflatten()

RexxObject * RexxClass::unflatten ( RexxEnvelope envelope)
virtual

Reimplemented from RexxVirtualBase.

Definition at line 120 of file ClassClass.cpp.

◆ uninherit()

◆ updateInstanceSubClasses()

◆ updateSubClasses()

Member Data Documentation

◆ baseClass

RexxClass* RexxClass::baseClass
protected

Definition at line 171 of file ClassClass.hpp.

Referenced by getBaseClass(), live(), liveGeneral(), mixinclass(), newRexx(), and subClassable().

◆ classFlags

◆ classInstance

RexxClass * RexxClass::classInstance = OREF_NULL
static

Definition at line 148 of file ClassClass.hpp.

◆ classMethodDictionary

RexxTable* RexxClass::classMethodDictionary
protected

◆ classSuperClasses

RexxArray* RexxClass::classSuperClasses
protected

◆ id

RexxString* RexxClass::id ( void  )
protected

Definition at line 163 of file ClassClass.hpp.

Referenced by defaultName(), getId(), makeProxy(), newRexx(), and operator new().

◆ instanceBehaviour

◆ instanceMethodDictionary

RexxTable* RexxClass::instanceMethodDictionary
protected

◆ instanceSuperClasses

◆ metaClass

RexxArray* RexxClass::metaClass
protected

◆ metaClassMethodDictionary

RexxArray* RexxClass::metaClassMethodDictionary
protected

Definition at line 174 of file ClassClass.hpp.

Referenced by live(), liveGeneral(), newRexx(), setMetaClass(), subclass(), and subClassable().

◆ metaClassScopes

RexxIdentityTable* RexxClass::metaClassScopes
protected

Definition at line 175 of file ClassClass.hpp.

Referenced by live(), liveGeneral(), newRexx(), setMetaClass(), subclass(), and subClassable().

◆ package

PackageClass* RexxClass::package
protected

Definition at line 186 of file ClassClass.hpp.

Referenced by getPackage(), live(), liveGeneral(), setPackage(), and subclass().

◆ subClasses

RexxList* RexxClass::subClasses
protected

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