#include <opcode_call_method.h>
Inheritance diagram for NLAISCRIPT::CMethodContext:

Public Member Functions | |
| const IMethodContext * | clone () const |
| virtual void | loadContext (CCodeContext &context) |
| virtual void | saveContext (CCodeContext &context) |
|
|
Server method need this, in particular on the copy constructor where it is easy to clone param to init attribut. Implements NLAISCRIPT::IMethodContext. Definition at line 36 of file opcode_call_method.cpp.
00037 {
00038 return new CMethodContext();
00039 }
|
|
|
Allow to reload old context before the return of method. Implements NLAISCRIPT::IMethodContext. Definition at line 64 of file opcode_call_method.cpp. References NLAISCRIPT::CCodeContext::Heap, NLAISCRIPT::CCodeContext::Param, NLAISCRIPT::CStackPointer::restoreShift(), and NLAISCRIPT::CStackPointer::restoreStack().
00065 {
00066 context.Heap.restoreShift();
00067 context.Heap.restoreStack();
00068 context.Param.back()->release();
00069 context.Param.pop_back();
00070 }
|
|
|
Allow to save the register, ip pointer .... before method call. Implements NLAISCRIPT::IMethodContext. Definition at line 41 of file opcode_call_method.cpp. References NLAISCRIPT::CStackPointer::addStack(), NLAISCRIPT::CCodeContext::Heap, NLAIC::IPointerGestion::incRef(), NLAIAGENT::CConstIteratorContener::isInEnd(), NLAISCRIPT::CCodeContext::Param, param, NLAISCRIPT::CStackPointer::setShift(), NLAISCRIPT::CCodeContext::Stack, uint, and z.
00042 {
00043 NLAIAGENT::IBaseGroupType *param = (NLAIAGENT::IBaseGroupType *)context.Stack[(int)context.Stack];
00044 NLAIAGENT::CIteratorContener It = param->getIterator();
00045 uint z = 0;
00046 while(!It.isInEnd())
00047 {
00048 NLAIAGENT::IObjectIA *o = (NLAIAGENT::IObjectIA *)It++;
00049 o->incRef();
00050 context.Heap[(int)context.Heap] = o;
00051 context.Heap ++;
00052 z ++;
00053 }
00054 int bp = (int)context.Heap;
00055 CVarPStackParam::_Shift += bp;
00056 context.Heap.addStack(z);
00057 context.Heap.setShift((int)context.Heap);
00058 context.Param.push_back(param);
00059 param->incRef();
00060 context.Stack --;
00061
00062 }
|
1.3.6