#include <ClassClass.hpp>
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 RexxClass * | classInstance = OREF_NULL |
Static Public Attributes inherited from RexxObject | |
static PCPPM | operatorMethods [] |
static RexxClass * | classInstance = 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 } |
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 49 of file ClassClass.hpp.
|
protected |
Enumerator | |
---|---|
REXX_DEFINED | |
MIXIN | |
HAS_UNINIT | |
META_CLASS | |
PRIMITIVE_CLASS | |
PARENT_HAS_UNINIT | |
ABSTRACT |
Definition at line 151 of file ClassClass.hpp.
|
inline |
Definition at line 57 of file ClassClass.hpp.
|
inline |
Definition at line 58 of file ClassClass.hpp.
void RexxClass::addSubClass | ( | RexxClass * | subClass | ) |
Definition at line 367 of file ClassClass.cpp.
References RexxList::addFirst(), and subClasses.
Referenced by inherit(), subclass(), and subClassable().
void RexxClass::checkAbstract | ( | ) |
Definition at line 1695 of file ClassClass.cpp.
References Error_Execution_abstract_class, isAbstract(), and reportException().
Referenced by RexxMethod::newFileRexx(), RoutineClass::newFileRexx(), RexxIdentityTable::newRexx(), RexxList::newRexx(), RexxMessage::newRexx(), RexxMethod::newRexx(), RexxMutableBufferClass::newRexx(), RexxQueue::newRexx(), RexxRelation::newRexx(), RoutineClass::newRexx(), RexxStem::newRexx(), RexxString::newRexx(), RexxSupplierClass::newRexx(), RexxTable::newRexx(), WeakReference::newRexx(), RexxObject::newRexx(), PackageClass::newRexx(), and RexxDirectory::newRexx().
|
inline |
Definition at line 138 of file ClassClass.hpp.
References ABSTRACT, and classFlags.
Referenced by newRexx().
|
inline |
Definition at line 127 of file ClassClass.hpp.
References classFlags, and HAS_UNINIT.
void RexxClass::completeNewObject | ( | RexxObject * | obj, |
RexxObject ** | initArgs = OREF_NULL , |
||
size_t | argCount = 0 |
||
) |
void RexxClass::createClassBehaviour | ( | RexxBehaviour * | target_class_behaviour | ) |
Definition at line 969 of file ClassClass.cpp.
References RexxBehaviour::addScope(), RexxIdentityTable::allAt(), RexxInternalObject::behaviour, RexxBehaviour::checkScope(), classMethodDictionary, classSuperClasses, createClassBehaviour(), RexxArray::get(), RexxBehaviour::getMethodDictionary(), RexxBehaviour::getScopes(), instanceBehaviour, isMetaClass(), RexxBehaviour::mergeScope(), metaClass, RexxBehaviour::methodDictionaryMerge(), RexxArray::size(), TheClassClass, TheNilObject, and TheObjectClass.
Referenced by createClassBehaviour(), subclass(), and updateSubClasses().
|
static |
Definition at line 1861 of file ClassClass.cpp.
References new_object(), new_string(), TheClassBehaviour, TheClassClass, and TheClassClassBehaviour.
Referenced by RexxMemory::create().
void RexxClass::createInstanceBehaviour | ( | RexxBehaviour * | target_instance_behaviour | ) |
Definition at line 1044 of file ClassClass.cpp.
References RexxBehaviour::addScope(), RexxBehaviour::checkScope(), createInstanceBehaviour(), RexxArray::get(), instanceMethodDictionary, instanceSuperClasses, RexxBehaviour::methodDictionaryMerge(), RexxArray::size(), and TheNilObject.
Referenced by createInstanceBehaviour(), defineMethods(), enhanced(), subclass(), updateInstanceSubClasses(), and updateSubClasses().
|
virtual |
Reimplemented from RexxObject.
Definition at line 403 of file ClassClass.cpp.
References RexxString::concatToCstring(), RexxString::concatWithCstring(), and id.
Referenced by defaultNameRexx().
RexxString * RexxClass::defaultNameRexx | ( | ) |
Definition at line 1653 of file ClassClass.cpp.
References defaultName().
Referenced by RexxMemory::createImage().
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
method_name | The name of the new method. |
newMethod | The method object to add |
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().
RexxObject * RexxClass::defineMethod | ( | RexxString * | method_name, |
RexxMethod * | method_object | ||
) |
Definition at line 653 of file ClassClass.cpp.
References ARG_ONE, Error_No_method_name, instanceMethodDictionary, IntegerTwo, isOfClass, isRexxDefined(), lastMessageName(), RexxMethod::newMethodObject(), RexxMethod::newScope(), OREF_NULL, reportNomethod(), setHasUninitDefined(), RexxString::strCompare(), stringArgument(), RexxTable::stringPut(), TheNilObject, TheObjectClass, updateInstanceSubClasses(), and RexxString::upper().
Referenced by RexxMemory::createImage(), and ExtensionDirective::install().
RexxObject * RexxClass::defineMethods | ( | RexxTable * | newMethods | ) |
Definition at line 725 of file ClassClass.cpp.
References createInstanceBehaviour(), RexxHashTableCollection::first(), RexxHashTableCollection::index(), instanceBehaviour, instanceMethodDictionary, isOfClass, RexxHashTableCollection::next(), OREF_NULL, setHasUninitDefined(), RexxBehaviour::setMethodDictionary(), RexxMethod::setScope(), RexxBehaviour::setScopes(), RexxString::strCompare(), RexxTable::stringPut(), and RexxHashTableCollection::value().
Referenced by RexxMemory::createImage(), and ClassDirective::install().
void RexxClass::defmeths | ( | RexxTable * | newMethods | ) |
Definition at line 378 of file ClassClass.cpp.
References RexxHashTableCollection::available(), RexxInternalObject::behaviour, RexxBehaviour::define(), RexxHashTableCollection::first(), RexxHashTableCollection::index(), RexxHashTableCollection::next(), OREF_NULL, TheNilObject, and RexxHashTableCollection::value().
RexxObject * RexxClass::deleteMethod | ( | RexxString * | method_name | ) |
Definition at line 821 of file ClassClass.cpp.
References ARG_ONE, Error_No_method_name, instanceMethodDictionary, isRexxDefined(), lastMessageName(), OREF_NULL, RexxHashTableCollection::remove(), reportNomethod(), stringArgument(), updateInstanceSubClasses(), and RexxString::upper().
Referenced by RexxMemory::createImage().
RexxObject * RexxClass::enhanced | ( | RexxObject ** | args, |
size_t | argCount, | ||
size_t | named_argCount | ||
) |
Definition at line 1366 of file ClassClass.cpp.
References ARG_ONE, RexxInternalObject::behaviour, createInstanceBehaviour(), Error_Incorrect_method_minarg, instanceBehaviour, instanceMethodDictionary, IntegerOne, methodDictionaryCreate(), methodDictionaryMerge(), new_string(), OREF_NULL, reportException(), requiredArgument(), RexxObject::sendMessage(), RexxBehaviour::setEnhanced(), RexxBehaviour::setInstanceMethodDictionary(), RexxBehaviour::setMethodDictionary(), RexxBehaviour::setOwningClass(), RexxBehaviour::setScopes(), subclass(), and TheNilObject.
Referenced by RexxMemory::createImage().
RexxObject * RexxClass::equal | ( | RexxObject * | other | ) |
Definition at line 209 of file ClassClass.cpp.
References ARG_ONE, requiredArgument(), TheFalseObject, TheIntegerClass, TheNumberStringClass, TheStringClass, and TheTrueObject.
Referenced by RexxMemory::createImage(), isEqual(), and strictEqual().
|
virtual |
Reimplemented from RexxObject.
Definition at line 112 of file ClassClass.cpp.
RexxClass * RexxClass::getBaseClass | ( | ) |
Definition at line 301 of file ClassClass.cpp.
References baseClass.
Referenced by RexxMemory::createImage(), and inherit().
RexxTable * RexxClass::getBehaviourDictionary | ( | ) |
Definition at line 435 of file ClassClass.cpp.
References RexxInternalObject::behaviour, RexxHashTableCollection::copy(), RexxBehaviour::getMethodDictionary(), new_table(), and OREF_NULL.
Referenced by subClassable().
|
inline |
Definition at line 81 of file ClassClass.hpp.
References classSuperClasses.
|
virtual |
Get the primitive hash value of this String object.
Reimplemented from RexxInternalObject.
Definition at line 163 of file ClassClass.cpp.
Referenced by hash().
RexxString * RexxClass::getId | ( | ) |
Definition at line 284 of file ClassClass.cpp.
References id.
Referenced by classArgument(), RexxMemory::createImage(), RexxNativeActivation::createStackFrame(), InternalActivationFrame::createStackFrame(), RexxObject::defaultName(), RexxString::dynamicTarget(), RexxActivation::formatSourcelessTraceLine(), RexxObject::id(), RexxMemory::runUninits(), RexxMemory::saveImageMark(), and RexxActivation::traceEntry().
|
inline |
Definition at line 135 of file ClassClass.hpp.
References instanceBehaviour.
Referenced by RexxMethod::newFileRexx(), RoutineClass::newFileRexx(), RexxIdentityTable::newRexx(), RexxList::newRexx(), RexxMessage::newRexx(), RexxMethod::newRexx(), RexxQueue::newRexx(), RexxRelation::newRexx(), RoutineClass::newRexx(), RexxStem::newRexx(), RexxString::newRexx(), RexxSupplierClass::newRexx(), RexxTable::newRexx(), WeakReference::newRexx(), PackageClass::newRexx(), and RexxDirectory::newRexx().
RexxTable * RexxClass::getInstanceBehaviourDictionary | ( | ) |
Definition at line 417 of file ClassClass.cpp.
References RexxHashTableCollection::copy(), RexxBehaviour::getMethodDictionary(), instanceBehaviour, new_table(), and OREF_NULL.
Referenced by subClassable().
RexxClass * RexxClass::getMetaClass | ( | ) |
Definition at line 309 of file ClassClass.cpp.
References RexxArray::get(), isPrimitiveClass(), metaClass, and TheClassClass.
Referenced by RexxMemory::createImage(), and subclass().
PackageClass * RexxClass::getPackage | ( | ) |
Return the package containing the directive that defined a class.
Definition at line 1683 of file ClassClass.cpp.
References RexxInternalObject::isInRexxPackage(), package, resultOrNil(), and TheRexxPackage.
Referenced by RexxMemory::createImage().
RexxArray * RexxClass::getSubClasses | ( | ) |
Definition at line 358 of file ClassClass.cpp.
References subClasses, and RexxList::weakReferenceArray().
Referenced by RexxMemory::createImage(), defineClassMethod(), removeClassMethod(), updateInstanceSubClasses(), and updateSubClasses().
RexxClass * RexxClass::getSuperClass | ( | ) |
Definition at line 333 of file ClassClass.cpp.
References RexxArray::get(), instanceSuperClasses, TheNilObject, and TheObjectClass.
Referenced by RexxMemory::createImage().
RexxArray * RexxClass::getSuperClasses | ( | ) |
Definition at line 348 of file ClassClass.cpp.
References RexxArray::copy(), and instanceSuperClasses.
Referenced by RexxMemory::createImage().
|
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.
Reimplemented from RexxObject.
Definition at line 149 of file ClassClass.cpp.
References getHashValue().
|
inline |
Definition at line 125 of file ClassClass.hpp.
References classFlags, and HAS_UNINIT.
Referenced by inherit(), mixinclass(), RexxMethod::newFileRexx(), RoutineClass::newFileRexx(), RexxIdentityTable::newRexx(), RexxList::newRexx(), RexxMethod::newRexx(), RexxQueue::newRexx(), RexxRelation::newRexx(), RoutineClass::newRexx(), RexxStem::newRexx(), RexxString::newRexx(), RexxSupplierClass::newRexx(), RexxTable::newRexx(), WeakReference::newRexx(), newRexx(), PackageClass::newRexx(), RexxDirectory::newRexx(), and subclass().
RexxObject * RexxClass::inherit | ( | RexxClass * | mixin_class, |
RexxClass * | position | ||
) |
Definition at line 1195 of file ClassClass.cpp.
References RexxArray::addLast(), addSubClass(), ARG_ONE, RexxInternalObject::behaviour, RexxBehaviour::checkScope(), classSuperClasses, Error_Execution_baseclass, Error_Execution_mixinclass, Error_Execution_recursive_inherit, Error_Execution_uninherit, Error_No_method_name, getBaseClass(), hasUninitDefined(), RexxArray::indexOf(), RexxArray::insertAfter(), instanceBehaviour, instanceSuperClasses, RexxObject::isInstanceOf(), isMixinClass(), isRexxDefined(), lastMessageName(), OREF_NULL, parentHasUninitDefined(), reportException(), reportNomethod(), requiredArgument(), setParentHasUninitDefined(), TheClassClass, and updateSubClasses().
Referenced by RexxMemory::createImage().
|
inline |
Definition at line 124 of file ClassClass.hpp.
References ABSTRACT, and classFlags.
Referenced by checkAbstract(), and isAbstractRexx().
RexxObject * RexxClass::isAbstractRexx | ( | ) |
Test if this class is marked as abstract
Definition at line 278 of file ClassClass.cpp.
References booleanObject(), and isAbstract().
Referenced by RexxMemory::createImage().
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.
other | The comparison class. |
Definition at line 1615 of file ClassClass.cpp.
References RexxArray::get(), instanceSuperClasses, OREF_NULL, and RexxArray::size().
Referenced by RexxObject::isInstanceOf(), and isSubclassOf().
|
virtual |
Reimplemented from RexxObject.
Definition at line 181 of file ClassClass.cpp.
References RexxInternalObject::behaviour, equal(), Error_Logical_value_method, Error_No_result_object_message, RexxBehaviour::isPrimitive(), OREF_NULL, reportException(), RexxObject::sendMessage(), and TheTrueObject.
|
inline |
Definition at line 123 of file ClassClass.hpp.
References classFlags, and META_CLASS.
Referenced by createClassBehaviour(), isMetaClassRexx(), makeAbstract(), and subclass().
RexxObject * RexxClass::isMetaClassRexx | ( | ) |
Test if a class can be used as a metaclass
Definition at line 267 of file ClassClass.cpp.
References booleanObject(), and isMetaClass().
Referenced by RexxMemory::createImage().
|
inline |
Definition at line 122 of file ClassClass.hpp.
References classFlags, and MIXIN.
Referenced by inherit(), and queryMixinClass().
|
inline |
Definition at line 132 of file ClassClass.hpp.
References classFlags, and PRIMITIVE_CLASS.
Referenced by getMetaClass(), and newRexx().
|
inline |
Definition at line 121 of file ClassClass.hpp.
References classFlags, and REXX_DEFINED.
Referenced by defineMethod(), deleteMethod(), inherit(), and uninherit().
RexxObject * RexxClass::isSubclassOf | ( | RexxClass * | other | ) |
A stub to test compatibility of two classes.
other | The class for the superclass test. |
Definition at line 1647 of file ClassClass.cpp.
References ARG_ONE, isCompatibleWith(), requiredArgument(), TheFalseObject, and TheTrueObject.
Referenced by RexxMemory::createImage().
|
virtual |
Reimplemented from RexxObject.
Definition at line 67 of file ClassClass.cpp.
References baseClass, classMethodDictionary, classSuperClasses, instanceBehaviour, instanceMethodDictionary, instanceSuperClasses, memory_mark, metaClass, metaClassMethodDictionary, metaClassScopes, package, and subClasses.
Referenced by RexxIntegerClass::live(), and RexxTextClass::live().
|
virtual |
Reimplemented from RexxObject.
Definition at line 87 of file ClassClass.cpp.
References baseClass, classMethodDictionary, classSuperClasses, instanceBehaviour, instanceMethodDictionary, instanceSuperClasses, memory_mark_general, metaClass, metaClassMethodDictionary, metaClassScopes, package, SAVINGIMAGE, RexxInternalObject::setInRexxPackage(), and subClasses.
Referenced by RexxIntegerClass::liveGeneral(), and RexxTextClass::liveGeneral().
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().
|
virtual |
Reimplemented from RexxInternalObject.
Definition at line 128 of file ClassClass.cpp.
References RexxString::getStringData(), id, and new_proxy().
void RexxClass::mergeSuperClassScopes | ( | RexxBehaviour * | target_instance_behaviour | ) |
Merge the scopes from the superclasses into a target primitive class.
target_instance_behaviour | The 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().
RexxMethod * RexxClass::method | ( | RexxString * | method_name | ) |
Definition at line 850 of file ClassClass.cpp.
References ARG_ONE, Error_No_method_name, RexxBehaviour::getMethodDictionary(), instanceBehaviour, OREF_NULL, reportException(), stringArgument(), RexxTable::stringGet(), and RexxString::upper().
Referenced by RexxMemory::createImage().
Definition at line 1147 of file ClassClass.cpp.
References RexxSupplier::available(), RexxSupplier::index(), IntegerOne, isOfClass, new_table(), RexxMethod::newMethodObject(), RexxMethod::newScope(), RexxSupplier::next(), OREF_NULL, REQUEST_STRING(), RexxObject::sendMessage(), RexxMethod::setScope(), RexxTable::stringAdd(), TheNilObject, TheTrueObject, RexxString::upper(), and RexxSupplier::value().
Referenced by enhanced(), and subclass().
Definition at line 1114 of file ClassClass.cpp.
References RexxHashTableCollection::available(), RexxHashTableCollection::first(), RexxHashTableCollection::index(), RexxHashTableCollection::next(), OREF_NULL, REQUEST_STRING(), setHasUninitDefined(), RexxString::strCompare(), RexxTable::stringAdd(), and RexxHashTableCollection::value().
Referenced by enhanced(), and subclass().
RexxSupplier * RexxClass::methods | ( | RexxClass * | class_object | ) |
Definition at line 869 of file ClassClass.cpp.
References RexxInternalObject::behaviour, RexxBehaviour::checkScope(), RexxBehaviour::getMethodDictionary(), instanceBehaviour, instanceMethodDictionary, OREF_NULL, RexxObject::sendMessage(), RexxHashTableCollection::supplier(), TheNilObject, and TheNullArray.
Referenced by RexxMemory::createImage().
RexxClass * RexxClass::mixinclass | ( | PackageClass * | package, |
RexxString * | mixin_id, | ||
RexxClass * | meta_class, | ||
RexxTable * | enhancing_class_methods | ||
) |
Definition at line 1430 of file ClassClass.cpp.
References baseClass, hasUninitDefined(), OrefSet, parentHasUninitDefined(), setMixinClass(), setParentHasUninitDefined(), and subclass().
Referenced by ClassDirective::install(), and mixinClassRexx().
RexxClass * RexxClass::mixinClassRexx | ( | RexxString * | class_id, |
RexxClass * | meta_class, | ||
RexxObject * | enhancing_class_methods | ||
) |
Create a mixinclass of a class directly from Rexx code.
class_id | The id of the created class. |
meta_class | The meta class to create this from. |
enhancing_class_methods | Additional class methods. |
Definition at line 1423 of file ClassClass.cpp.
References mixinclass(), and OREF_NULL.
Referenced by RexxMemory::createImage().
RexxClass * RexxClass::newRexx | ( | RexxObject ** | args, |
size_t | argCount, | ||
size_t | named_argCount | ||
) |
Definition at line 1756 of file ClassClass.cpp.
References RexxIdentityTable::add(), RexxArray::addFirst(), RexxBehaviour::addScope(), RexxIdentityTable::allAt(), ARG_ONE, baseClass, RexxInternalObject::behaviour, classMethodDictionary, classSuperClasses, clearAbstract(), RexxInternalObject::clone(), RexxBehaviour::copy(), RexxArray::copy(), RexxHashTableCollection::copy(), Error_Incorrect_method_minarg, RexxBehaviour::getScopes(), hasUninitDefined(), id, instanceBehaviour, instanceMethodDictionary, instanceSuperClasses, IntegerOne, isPrimitiveClass(), metaClass, metaClassMethodDictionary, metaClassScopes, new_array(), new_identity_table(), new_list(), new_table(), OREF_NULL, OrefSet, reportException(), RexxObject::sendMessage(), setHasUninitDefined(), setInitialFlagState(), RexxBehaviour::setOwningClass(), RexxBehaviour::setScopes(), stringArgument(), subClasses, TheClassClass, TheNilObject, and TheObjectClass.
Referenced by RexxMemory::createImage().
RexxObject * RexxClass::notEqual | ( | RexxObject * | other | ) |
Definition at line 231 of file ClassClass.cpp.
References ARG_ONE, requiredArgument(), TheFalseObject, TheIntegerClass, TheNumberStringClass, TheStringClass, and TheTrueObject.
Referenced by RexxMemory::createImage().
|
inline |
Definition at line 53 of file ClassClass.hpp.
|
inline |
Definition at line 55 of file ClassClass.hpp.
|
inline |
Definition at line 54 of file ClassClass.hpp.
|
inline |
Definition at line 52 of file ClassClass.hpp.
void * RexxClass::operator new | ( | size_t | size, |
size_t | size1, | ||
const char * | className, | ||
RexxBehaviour * | class_behaviour, | ||
RexxBehaviour * | instanceBehaviour | ||
) |
Definition at line 1718 of file ClassClass.cpp.
References RexxInternalObject::behaviour, id, instanceBehaviour, RexxInternalObject::makeProxiedObject(), new_object(), new_string(), OrefSet, RexxInternalObject::setBehaviour(), and RexxBehaviour::setOwningClass().
|
inline |
Definition at line 130 of file ClassClass.hpp.
References classFlags, and PARENT_HAS_UNINIT.
Referenced by inherit(), mixinclass(), and subclass().
|
static |
Perform common initialization steps on an object created by a new method from Rexx. This handles subclass behaviour issues, uninit processing, etc.
obj | The newly created object. NOTE: this assumes the caller has protected this object from garbage collection. |
initArgs | A pointer to arguments intended for the INIT method. |
argCount | The 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().
RexxInteger * RexxClass::queryMixinClass | ( | ) |
Definition at line 253 of file ClassClass.cpp.
References isMixinClass(), TheFalseObject, and TheTrueObject.
Referenced by RexxMemory::createImage().
void RexxClass::removeClassMethod | ( | RexxString * | method_name | ) |
Remove a class method from a class and all of its class methods.
method_name | The 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().
void RexxClass::removeSubclass | ( | RexxClass * | c | ) |
Remove a subclass from the uninherit list after an uninherit operation.
c | The 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().
|
inline |
Definition at line 137 of file ClassClass.hpp.
References ABSTRACT, and classFlags.
Referenced by makeAbstract().
|
inline |
Definition at line 126 of file ClassClass.hpp.
References classFlags, and HAS_UNINIT.
Referenced by defineMethod(), defineMethods(), methodDictionaryMerge(), newRexx(), and subclass().
|
inline |
Definition at line 129 of file ClassClass.hpp.
References classFlags, and HAS_UNINIT.
Referenced by newRexx().
void RexxClass::setInstanceBehaviour | ( | RexxBehaviour * | b | ) |
Definition at line 324 of file ClassClass.cpp.
References instanceBehaviour, and OrefSet.
Referenced by RexxBehaviour::restoreClass().
|
inline |
Definition at line 136 of file ClassClass.hpp.
References classFlags, and META_CLASS.
Referenced by subClassable().
void RexxClass::setMetaClass | ( | RexxClass * | new_metaClass | ) |
Definition at line 1585 of file ClassClass.cpp.
References RexxIdentityTable::add(), RexxArray::addFirst(), RexxIdentityTable::allAt(), instanceMethodDictionary, metaClass, metaClassMethodDictionary, metaClassScopes, new_array(), OrefSet, TheClassClass, and TheNilObject.
Referenced by subclass().
|
inline |
Definition at line 133 of file ClassClass.hpp.
References classFlags, and MIXIN.
Referenced by mixinclass().
|
inline |
Definition at line 134 of file ClassClass.hpp.
References classFlags, and PRIMITIVE_CLASS.
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.
s | The 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().
|
inline |
Definition at line 131 of file ClassClass.hpp.
References classFlags, and PARENT_HAS_UNINIT.
Referenced by inherit(), mixinclass(), and subclass().
RexxObject * RexxClass::setRexxDefined | ( | void | ) |
Definition at line 292 of file ClassClass.cpp.
References classFlags, OREF_NULL, and REXX_DEFINED.
Referenced by RexxMemory::createImage().
RexxObject * RexxClass::strictEqual | ( | RexxObject * | other | ) |
Definition at line 172 of file ClassClass.cpp.
References equal().
Referenced by RexxMemory::createImage().
RexxClass * RexxClass::subclass | ( | PackageClass * | package, |
RexxString * | class_id, | ||
RexxClass * | meta_class, | ||
RexxTable * | enhancing_class_methods | ||
) |
Definition at line 1473 of file ClassClass.cpp.
References RexxIdentityTable::add(), RexxArray::addFirst(), addSubClass(), RexxIdentityTable::allAt(), RexxInternalObject::behaviour, classMethodDictionary, classSuperClasses, createClassBehaviour(), createInstanceBehaviour(), Error_Translation_bad_metaclass, RexxIdentityTable::get(), getMetaClass(), RexxInternalObject::hasUninit(), hasUninitDefined(), RexxObject::hasUninitMethod(), instanceBehaviour, instanceMethodDictionary, instanceSuperClasses, RexxObject::isInstanceOf(), isMetaClass(), metaClass, metaClassMethodDictionary, metaClassScopes, methodDictionaryCreate(), methodDictionaryMerge(), new_array(), OREF_NULL, OrefSet, package, parentHasUninitDefined(), reportException(), RexxObject::sendMessage(), setHasUninitDefined(), setMetaClass(), RexxBehaviour::setMethodDictionary(), RexxBehaviour::setOwningClass(), setPackage(), setParentHasUninitDefined(), RexxBehaviour::setScopes(), RexxBehaviour::subclass(), TheClassClass, and TheNilObject.
Referenced by defineClassMethod(), enhanced(), ClassDirective::install(), mixinclass(), removeClassMethod(), subclassRexx(), updateInstanceSubClasses(), and updateSubClasses().
void RexxClass::subClassable | ( | bool | restricted | ) |
Initialize a base Rexx class.
restricted | Whether 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.
void RexxClass::subClassable | ( | RexxClass * | superClass, |
bool | restricted | ||
) |
Initialize a base Rexx class that inherits from a primitive class other than Object.
superClass | The immediate superclass of the created class. |
restricted | Whether 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.
RexxClass * RexxClass::subclassRexx | ( | RexxString * | class_id, |
RexxClass * | meta_class, | ||
RexxObject * | enhancing_class_methods | ||
) |
Create a subclass of a class directly from Rexx code.
class_id | The id of the created class. |
meta_class | The meta class to create this from. |
enhancing_class_methods | Additional class methods. |
Definition at line 1466 of file ClassClass.cpp.
References OREF_NULL, and subclass().
Referenced by RexxMemory::createImage().
|
virtual |
Reimplemented from RexxVirtualBase.
Definition at line 120 of file ClassClass.cpp.
RexxObject * RexxClass::uninherit | ( | RexxClass * | mixin_class | ) |
Definition at line 1300 of file ClassClass.cpp.
References ARG_ONE, classSuperClasses, RexxArray::deleteItem(), Error_Execution_uninherit, Error_No_method_name, RexxArray::indexOf(), instanceSuperClasses, isRexxDefined(), lastMessageName(), OREF_NULL, removeSubclass(), reportException(), reportNomethod(), requiredArgument(), and updateSubClasses().
Referenced by RexxMemory::createImage().
void RexxClass::updateInstanceSubClasses | ( | ) |
Definition at line 944 of file ClassClass.cpp.
References createInstanceBehaviour(), RexxArray::get(), getSubClasses(), instanceBehaviour, OREF_NULL, RexxBehaviour::setMethodDictionary(), RexxBehaviour::setScopes(), RexxArray::size(), subclass(), and updateInstanceSubClasses().
Referenced by defineMethod(), deleteMethod(), and updateInstanceSubClasses().
void RexxClass::updateSubClasses | ( | ) |
Definition at line 909 of file ClassClass.cpp.
References RexxInternalObject::behaviour, createClassBehaviour(), createInstanceBehaviour(), RexxArray::get(), getSubClasses(), instanceBehaviour, OREF_NULL, RexxBehaviour::setMethodDictionary(), RexxBehaviour::setScopes(), RexxArray::size(), subclass(), and updateSubClasses().
Referenced by inherit(), uninherit(), and updateSubClasses().
|
protected |
Definition at line 171 of file ClassClass.hpp.
Referenced by getBaseClass(), live(), liveGeneral(), mixinclass(), newRexx(), and subClassable().
|
protected |
Definition at line 183 of file ClassClass.hpp.
Referenced by clearAbstract(), clearHasUninitDefined(), hasUninitDefined(), isAbstract(), isMetaClass(), isMixinClass(), isPrimitiveClass(), isRexxDefined(), parentHasUninitDefined(), setAbstract(), setHasUninitDefined(), setInitialFlagState(), setMetaClass(), setMixinClass(), setNonPrimitive(), setParentHasUninitDefined(), setRexxDefined(), and subClassable().
Definition at line 148 of file ClassClass.hpp.
|
protected |
Definition at line 166 of file ClassClass.hpp.
Referenced by createClassBehaviour(), defineClassMethod(), live(), liveGeneral(), newRexx(), subclass(), and subClassable().
|
protected |
Definition at line 177 of file ClassClass.hpp.
Referenced by createClassBehaviour(), getClassSuperClasses(), inherit(), live(), liveGeneral(), newRexx(), subclass(), subClassable(), and uninherit().
|
protected |
Definition at line 163 of file ClassClass.hpp.
Referenced by defaultName(), getId(), makeProxy(), newRexx(), and operator new().
|
protected |
Definition at line 168 of file ClassClass.hpp.
Referenced by createClassBehaviour(), defineMethods(), enhanced(), getInstanceBehaviour(), getInstanceBehaviourDictionary(), inherit(), live(), liveGeneral(), mergeSuperClassScopes(), method(), methods(), newRexx(), operator new(), setInstanceBehaviour(), subclass(), subClassable(), updateInstanceSubClasses(), and updateSubClasses().
|
protected |
Definition at line 170 of file ClassClass.hpp.
Referenced by createInstanceBehaviour(), defineMethod(), defineMethods(), deleteMethod(), enhanced(), live(), liveGeneral(), methods(), newRexx(), setMetaClass(), subclass(), and subClassable().
|
protected |
Definition at line 180 of file ClassClass.hpp.
Referenced by createInstanceBehaviour(), getSuperClass(), getSuperClasses(), inherit(), isCompatibleWith(), live(), liveGeneral(), mergeSuperClassScopes(), newRexx(), subclass(), subClassable(), and uninherit().
|
protected |
Definition at line 172 of file ClassClass.hpp.
Referenced by createClassBehaviour(), getMetaClass(), live(), liveGeneral(), newRexx(), setMetaClass(), subclass(), and subClassable().
|
protected |
Definition at line 174 of file ClassClass.hpp.
Referenced by live(), liveGeneral(), newRexx(), setMetaClass(), subclass(), and subClassable().
|
protected |
Definition at line 175 of file ClassClass.hpp.
Referenced by live(), liveGeneral(), newRexx(), setMetaClass(), subclass(), and subClassable().
|
protected |
Definition at line 186 of file ClassClass.hpp.
Referenced by getPackage(), live(), liveGeneral(), setPackage(), and subclass().
|
protected |
Definition at line 185 of file ClassClass.hpp.
Referenced by addSubClass(), getSubClasses(), live(), liveGeneral(), newRexx(), removeSubclass(), and subClassable().