From: <bi...@us...> - 2013-11-26 01:27:40
|
Revision: 9573 http://sourceforge.net/p/oorexx/code-0/9573 Author: bigrixx Date: 2013-11-26 01:27:37 +0000 (Tue, 26 Nov 2013) Log Message: ----------- [feature-requests: #564] Add string method to the StackFrame class Modified Paths: -------------- main/trunk/interpreter/classes/StackFrameClass.cpp main/trunk/interpreter/classes/StackFrameClass.hpp main/trunk/interpreter/memory/Setup.cpp Modified: main/trunk/interpreter/classes/StackFrameClass.cpp =================================================================== --- main/trunk/interpreter/classes/StackFrameClass.cpp 2013-11-25 20:13:59 UTC (rev 9572) +++ main/trunk/interpreter/classes/StackFrameClass.cpp 2013-11-26 01:27:37 UTC (rev 9573) @@ -268,3 +268,23 @@ } return target; } + +/** + * Default string method override + * + * @return The trace line + */ +RexxString *StackFrameClass::stringValue() +{ + return getTraceLine(); +} + +/** + * Default makestring method override + * + * @return The trace line + */ +RexxString *StackFrameClass::makeString() +{ + return getTraceLine(); +} Modified: main/trunk/interpreter/classes/StackFrameClass.hpp =================================================================== --- main/trunk/interpreter/classes/StackFrameClass.hpp 2013-11-25 20:13:59 UTC (rev 9572) +++ main/trunk/interpreter/classes/StackFrameClass.hpp 2013-11-26 01:27:37 UTC (rev 9573) @@ -79,6 +79,8 @@ RexxString *getTraceLine(); RexxArray *getArguments(); RexxSource *getSourceObject(); + virtual RexxString *makeString(); + virtual RexxString *stringValue(); RexxObject *newRexx(RexxObject **args, size_t argc); Modified: main/trunk/interpreter/memory/Setup.cpp =================================================================== --- main/trunk/interpreter/memory/Setup.cpp 2013-11-25 20:13:59 UTC (rev 9572) +++ main/trunk/interpreter/memory/Setup.cpp 2013-11-26 01:27:37 UTC (rev 9573) @@ -1357,6 +1357,9 @@ defineKernelMethod("TRACELINE", TheStackFrameBehaviour, CPPM(StackFrameClass::getTraceLine), 0); defineKernelMethod("TYPE", TheStackFrameBehaviour, CPPM(StackFrameClass::getType), 0); defineKernelMethod("ARGUMENTS", TheStackFrameBehaviour, CPPM(StackFrameClass::getArguments), 0); + // the string method just maps to TRACELINE + defineKernelMethod("STRING", TheStackFrameBehaviour, CPPM(StackFrameClass::getTraceLine), 0); + defineKernelMethod("MAKESTRING", TheStackFrameBehaviour, CPPM(StackFrameClass::getTraceLine), 0); /* set the scope of the methods to */ /* this classes oref */ |