Esempio n. 1
0
boost::weak_ptr<ISimData> SimController::LoadSimData(string modelKey)
{
    //if the simdata is already loaded
    std::map<string,boost::shared_ptr<ISimData> > ::iterator iter = _sim_data.find(modelKey);
    if(iter != _sim_data.end())
    {
        //destroy system
        _sim_data.erase(iter);
    }
    //create system
    boost::shared_ptr<ISimData> sim_data = createSimData();
    _sim_data[modelKey] = sim_data;
    return sim_data;
}
Esempio n. 2
0
shared_ptr<ISimData> VxWorksFactory::LoadSimData()
{
    ISimData* simData = createSimData();
    return shared_ptr<ISimData>(simData);
}