本文整理汇总了C++中Serial::readSign方法的典型用法代码示例。如果您正苦于以下问题:C++ Serial::readSign方法的具体用法?C++ Serial::readSign怎么用?C++ Serial::readSign使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Serial
的用法示例。
在下文中一共展示了Serial::readSign方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadState
//
// Thread::loadState
//
void Thread::loadState(Serial &in)
{
std::size_t count, countFull;
in.readSign(Signature::Thread);
module = env->getModule(env->readModuleName(in));
codePtr = &module->codeV[ReadVLN<std::size_t>(in)];
scopeGbl = env->getGlobalScope(ReadVLN<Word>(in));
scopeHub = scopeGbl->getHubScope(ReadVLN<Word>(in));
scopeMap = scopeHub->getMapScope(ReadVLN<Word>(in));
scopeMod = scopeMap->getModuleScope(module);
script = env->readScript(in);
delay = ReadVLN<Word>(in);
result = ReadVLN<Word>(in);
count = ReadVLN<std::size_t>(in);
callStk.clear(); callStk.reserve(count + CallStkSize);
while(count--)
callStk.push(readCallFrame(in));
count = ReadVLN<std::size_t>(in);
dataStk.clear(); dataStk.reserve(count + DataStkSize);
while(count--)
dataStk.push(ReadVLN<Word>(in));
countFull = ReadVLN<std::size_t>(in);
count = ReadVLN<std::size_t>(in);
localArr.allocLoad(countFull, count);
for(auto itr = localArr.beginFull(), end = localArr.end(); itr != end; ++itr)
itr->loadState(in);
countFull = ReadVLN<std::size_t>(in);
count = ReadVLN<std::size_t>(in);
localReg.allocLoad(countFull, count);
for(auto itr = localReg.beginFull(), end = localReg.end(); itr != end; ++itr)
*itr = ReadVLN<Word>(in);
countFull = ReadVLN<std::size_t>(in);
count = ReadVLN<std::size_t>(in);
in.in->read(printBuf.getLoadBuf(countFull, count), countFull);
state.state = static_cast<ThreadState::State>(ReadVLN<int>(in));
state.data = ReadVLN<Word>(in);
state.type = ReadVLN<Word>(in);
in.readSign(~Signature::Thread);
}