This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/doric/context_manager.cpp
2021-05-20 18:27:45 +08:00

11 lines
417 B
C++

#include "context_manager.h"
Context *ContextManager::createContext(QString script, QString source, QString extra)
{
int contextId = counter->fetchAndAddOrdered(1);
Context *context = new Context(QString::number(contextId), source, extra);
contextMap->insert(QString::number(contextId), context);
context->getDriver()->createContext(QString::number(contextId), script, source);
return context;
}