ooRexx  4.2.0-source
About: ooRexx (Open Object Rexx) is a free implementation of Object Rexx. Object Rexx is an enhancement of the classic Rexx interpreter; a full-featured programming language with a human-oriented syntax.
  Fossies Dox: ooRexx-4.2.0-source.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

BaseCode Class Reference

#include <MethodClass.hpp>

Inheritance diagram for BaseCode:
[legend]
Collaboration diagram for BaseCode:
[legend]

Public Member Functions

virtual void run (RexxActivity *, RexxMethod *, RexxObject *, RexxString *, RexxObject **, size_t, ProtectedObject &)
 
virtual void call (RexxActivity *, RoutineClass *, RexxString *, RexxObject **, size_t, RexxString *, RexxString *, int, ProtectedObject &)
 
virtual void call (RexxActivity *, RoutineClass *, RexxString *, RexxObject **, size_t, ProtectedObject &)
 
virtual RexxArraygetSource ()
 
virtual RexxObjectsetSecurityManager (RexxObject *manager)
 
virtual RexxSourcegetSourceObject ()
 
virtual RexxClassfindClass (RexxString *className)
 
virtual BaseCodesetSourceObject (RexxSource *s)
 
virtual PackageClassgetPackage ()
 
- Public Member Functions inherited from RexxInternalObject
void * operator new (size_t, RexxClass *)
 
void * operator new (size_t, RexxClass *, RexxObject **, 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 RexxObjectcopy ()
 
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 void live (size_t)
 
virtual void liveGeneral (int reason)
 
virtual void flatten (RexxEnvelope *)
 
virtual RexxObjectunflatten (RexxEnvelope *)
 

Additional Inherited Members

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

Detailed Description

Base class for a code object. Code objects can be invoked as methods, or called.

Definition at line 62 of file MethodClass.hpp.

Member Function Documentation

◆ call() [1/2]

void BaseCode::call ( RexxActivity activity,
RoutineClass routine,
RexxString msgname,
RexxObject **  arguments,
size_t  argcount,
ProtectedObject result 
)
virtual

Simplified call form used for calling from Rexx code to native code.

Parameters
activityThe current activity.
msgnameThe name of the call.
argumentsthe call arguments.
argcountThe count of arguments.
resultThe returned result.

Reimplemented in RexxRoutine, RegisteredRoutine, RexxNativeRoutine, and RexxCode.

Definition at line 736 of file MethodClass.cpp.

References Error_Interpretation, and reportException().

◆ call() [2/2]

void BaseCode::call ( RexxActivity activity,
RoutineClass routine,
RexxString msgname,
RexxObject **  arguments,
size_t  argcount,
RexxString ct,
RexxString env,
int  context,
ProtectedObject result 
)
virtual

Invoke a code element as a call target. This form is generally only used for calls from Rexx code to Rexx code or for top level program invocation.

Parameters
activityThe activity we're running under.
msgnameThe name of the program or name used to invoke the routine.
argumentsThe arguments to the method.
argcountThe count of arguments.
ctThe call context.
envThe current address environment.
contextThe type of call being made (program call, internal call, interpret, etc.)
resultThe returned result.

Reimplemented in RexxCode.

Definition at line 719 of file MethodClass.cpp.

Referenced by RoutineClass::call(), RoutineClass::callRexx(), RoutineClass::callWithRexx(), and RoutineClass::runProgram().

◆ findClass()

RexxClass * BaseCode::findClass ( RexxString className)
virtual

Default class resolution...which only looks in the environment or .local.

Parameters
classNameThe target class name.
Returns
The resolved class object, or OREF_NULL if this is not known.

Reimplemented in RexxNativeCode.

Definition at line 794 of file MethodClass.cpp.

References Interpreter::findClass().

Referenced by RexxNativeCode::findClass(), and BaseExecutable::findClass().

◆ getPackage()

PackageClass * BaseCode::getPackage ( )
virtual

Retrieve the package associated with a code object. Returns OREF_NULL if this code object doesn't have a source.

Returns
The associated package, or OREF_NULL.

Definition at line 825 of file MethodClass.cpp.

References BaseExecutable::getSourceObject(), OREF_NULL, and BaseExecutable::source().

◆ getSource()

RexxArray * BaseCode::getSource ( )
virtual

Return source informaton for a BaseCode object. If not representing an element in a source file, this returns an empty array.

Returns
A null array.

Reimplemented in RexxCode.

Definition at line 750 of file MethodClass.cpp.

References TheNullArray.

Referenced by BaseExecutable::getSource(), and BaseExecutable::source().

◆ getSourceObject()

RexxSource * BaseCode::getSourceObject ( )
virtual

Retrieve the source object associated with a code object.

Returns

Reimplemented in RexxCode, and RexxNativeCode.

Definition at line 780 of file MethodClass.cpp.

References OREF_NULL.

Referenced by BaseExecutable::getSourceObject().

◆ run()

void BaseCode::run ( RexxActivity activity,
RexxMethod method,
RexxObject receiver,
RexxString msgname,
RexxObject **  arguments,
size_t  argCount,
ProtectedObject result 
)
virtual

Run this code as a method invocation.

Parameters
activityThe current activity.
methodThe method we're invoking.
receiverThe method target object.
msgnameThe name the method was invoked under.
argCountThe count of arguments.
argumentsThe argument pointer.
resultThe returned result.

Reimplemented in RexxNativeMethod, AbstractCode, ConstantGetterCode, AttributeSetterCode, RexxCode, AttributeGetterCode, and CPPCode.

Definition at line 697 of file MethodClass.cpp.

References Error_Interpretation, and reportException().

Referenced by RexxMethod::run().

◆ setSecurityManager()

RexxObject * BaseCode::setSecurityManager ( RexxObject manager)
virtual

Set the security manager in the code source context.

Parameters
managerThe new security manager.
Returns
Returns true if the manager could be set. Non-Rexx code objects just return false unconditionally.

Reimplemented in RexxCode.

Definition at line 765 of file MethodClass.cpp.

References TheFalseObject.

Referenced by RoutineClass::setSecurityManager(), and RexxMethod::setSecurityManager().

◆ setSourceObject()

BaseCode * BaseCode::setSourceObject ( RexxSource s)
virtual

Set a source object into a code context. The default implementation is just to return the same object without setting a source. This is used mostly for attaching a source context to native code methods and routines defined on directives.

Parameters
sThe new source object.
Returns
Either the same object, or a new copy of the code object.

Reimplemented in RexxNativeCode.

Definition at line 813 of file MethodClass.cpp.

Referenced by BaseExecutable::setSourceObject().


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