#include <UCProcess.h>
Inheritance diagram for UCProcess:

Public Member Functions | |
| UCProcess () | |
| UCProcess (uint16 classid_, uint16 offset_, uint32 this_ptr=0, int thissize=0, const uint8 *args=0, int argsize=0) | |
| ~UCProcess () | |
| ENABLE_RUNTIME_CLASSTYPE () | |
| virtual bool | run (const uint32 framenum) |
| virtual void | terminate () |
| void | freeOnTerminate (uint16 index, int type) |
| void | setReturnValue (uint32 retval) |
| virtual void | dumpInfo () |
| bool | loadData (IDataSource *ids, uint32 version) |
Protected Member Functions | |
| virtual void | saveData (ODataSource *ods) |
| void | load (uint16 classid_, uint16 offset_, uint32 this_ptr=0, int thissize=0, const uint8 *args=0, int argsize=0) |
| void | call (uint16 classid_, uint16 offset_) |
| bool | ret () |
Protected Attributes | |
| uint16 | bp |
| Usecode * | usecode |
| uint16 | classid |
| uint16 | ip |
| uint32 | temp32 |
| UCStack | stack |
| std::list< std::pair< uint16, int > > | freeonterminate |
Friends | |
| class | UCMachine |
| class | Kernel |
Definition at line 32 of file UCProcess.h.
| UCProcess::UCProcess | ( | ) |
Definition at line 31 of file UCProcess.cpp.
References GameData::get_instance(), GameData::getMainUsecode(), and usecode.
| UCProcess::UCProcess | ( | uint16 | classid_, | |
| uint16 | offset_, | |||
| uint32 | this_ptr = 0, |
|||
| int | thissize = 0, |
|||
| const uint8 * | args = 0, |
|||
| int | argsize = 0 | |||
| ) |
Definition at line 36 of file UCProcess.cpp.
References bp, classid, GameData::get_instance(), GameData::getMainUsecode(), ip, load(), temp32, and usecode.
| UCProcess::~UCProcess | ( | ) |
Definition at line 49 of file UCProcess.cpp.
Definition at line 94 of file UCProcess.cpp.
References bp, classid, BaseUCStack::getSP(), ip, BaseUCStack::push2(), and stack.
Referenced by UCMachine::execProcess(), and load().
| void UCProcess::dumpInfo | ( | ) | [virtual] |
dump some info about this process to pout
Reimplemented from Process.
Definition at line 156 of file UCProcess.cpp.
References classid, Process::dumpInfo(), GameData::get_instance(), GameData::getMainUsecode(), ip, and pout.
| UCProcess::ENABLE_RUNTIME_CLASSTYPE | ( | ) |
Reimplemented from Process.
| void UCProcess::freeOnTerminate | ( | uint16 | index, | |
| int | type | |||
| ) |
Definition at line 119 of file UCProcess.cpp.
References freeonterminate.
Referenced by UCMachine::execProcess().
| void UCProcess::load | ( | uint16 | classid_, | |
| uint16 | offset_, | |||
| uint32 | this_ptr = 0, |
|||
| int | thissize = 0, |
|||
| const uint8 * | args = 0, |
|||
| int | argsize = 0 | |||
| ) | [protected] |
Definition at line 54 of file UCProcess.cpp.
References BaseUCStack::access(), BaseUCStack::addSP(), bp, call(), classid, Usecode::get_class_size(), UCMachine::get_instance(), BaseUCStack::getSP(), ip, perr, Process::pid, BaseUCStack::push(), BaseUCStack::push4(), stack, UCMachine::stackToPtr(), and usecode.
Referenced by UCProcess().
| bool UCProcess::loadData | ( | IDataSource * | ids, | |
| uint32 | version | |||
| ) |
load Process data
Reimplemented from Process.
Definition at line 187 of file UCProcess.cpp.
References bp, classid, freeonterminate, ip, UCStack::load(), Process::loadData(), stack, and temp32.
| bool UCProcess::ret | ( | ) | [protected] |
Definition at line 105 of file UCProcess.cpp.
References bp, classid, ip, BaseUCStack::pop2(), BaseUCStack::setSP(), and stack.
Referenced by UCMachine::execProcess().
| bool UCProcess::run | ( | const uint32 | framenum | ) | [virtual] |
Implements Process.
Definition at line 84 of file UCProcess.cpp.
References UCMachine::execProcess(), Process::flags, UCMachine::get_instance(), and Process::PROC_SUSPENDED.
| void UCProcess::saveData | ( | ODataSource * | ods | ) | [protected, virtual] |
save the Process data
Reimplemented from Process.
Definition at line 169 of file UCProcess.cpp.
References bp, classid, freeonterminate, ip, UCStack::save(), Process::saveData(), stack, temp32, ODataSource::write2(), and ODataSource::write4().
| void UCProcess::setReturnValue | ( | uint32 | retval | ) | [inline] |
| void UCProcess::terminate | ( | ) | [virtual] |
terminate the process. This wakes up all processes waiting for it.
Reimplemented from Process.
Definition at line 130 of file UCProcess.cpp.
References UCMachine::freeList(), freeonterminate, UCMachine::freeString(), UCMachine::freeStringList(), UCMachine::get_instance(), Process::terminate(), and Process::type.
friend class Kernel [friend] |
friend class UCMachine [friend] |
Definition at line 34 of file UCProcess.h.
uint16 UCProcess::bp [protected] |
Definition at line 66 of file UCProcess.h.
Referenced by call(), UCMachine::execProcess(), load(), loadData(), ret(), saveData(), and UCProcess().
uint16 UCProcess::classid [protected] |
Definition at line 70 of file UCProcess.h.
Referenced by call(), dumpInfo(), UCMachine::execProcess(), load(), loadData(), ret(), saveData(), and UCProcess().
std::list<std::pair<uint16, int> > UCProcess::freeonterminate [protected] |
Definition at line 79 of file UCProcess.h.
Referenced by freeOnTerminate(), loadData(), saveData(), and terminate().
uint16 UCProcess::ip [protected] |
Definition at line 71 of file UCProcess.h.
Referenced by call(), dumpInfo(), UCMachine::execProcess(), load(), loadData(), ret(), saveData(), and UCProcess().
UCStack UCProcess::stack [protected] |
Definition at line 76 of file UCProcess.h.
Referenced by UCMachine::assignPointer(), call(), UCMachine::dereferencePointer(), UCMachine::execProcess(), load(), loadData(), UCMachine::ptrToObject(), ret(), and saveData().
uint32 UCProcess::temp32 [protected] |
Definition at line 73 of file UCProcess.h.
Referenced by UCMachine::execProcess(), loadData(), saveData(), setReturnValue(), and UCProcess().
Usecode* UCProcess::usecode [protected] |
Definition at line 68 of file UCProcess.h.
Referenced by UCMachine::execProcess(), load(), and UCProcess().
1.4.7