本文整理汇总了C++中Mutator::setMutator方法的典型用法代码示例。如果您正苦于以下问题:C++ Mutator::setMutator方法的具体用法?C++ Mutator::setMutator怎么用?C++ Mutator::setMutator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mutator
的用法示例。
在下文中一共展示了Mutator::setMutator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addMutator
HRESULT MutationEngine::addMutator(PCHAR scriptFileName, PCHAR filter)
{
if(_mutators.size() >= this->_maxMutatorsNum)
{
dprintf("[windbgshark] MutationEngine::addMutator: sorry, mutators number reached _maxMutatorsNum = %d\n", this->_maxMutatorsNum);
return E_FAIL;
}
Mutator *pMutator = new Mutator();
if(pMutator == NULL)
{
dprintf("[windbgshark] MutationEngine::addMutator: error! could not allocate memory for a new mutator\n");
return E_FAIL;
}
ULONG mutatorId;
for(mutatorId = 0; mutatorId < this->_maxMutatorsNum; mutatorId++)
{
if(_mutators.find(mutatorId) == _mutators.end())
{
break;
}
}
if(mutatorId >= this->_maxMutatorsNum)
{
dprintf("[windbgshark] MutationEngine::addMutator: error! could not find suitable Id for mutator\n");
return E_FAIL;
}
pMutator->setMutator(mutatorId, scriptFileName, filter);
_mutators[mutatorId] = pMutator;
return S_OK;
}