Beispiel #1
0
boost::weak_ptr<ISimVars> SimController::LoadSimVars(string modelKey, size_t dim_real, size_t dim_int, size_t dim_bool, size_t dim_pre_vars, size_t dim_z, size_t z_i)
{
    //if the simdata is already loaded
    std::map<string,boost::shared_ptr<ISimVars> > ::iterator iter = _sim_vars.find(modelKey);
    if(iter != _sim_vars.end())
    {
        //destroy system
        _sim_vars.erase(iter);
    }
    //create system
    boost::shared_ptr<ISimVars> sim_vars = createSimVars(dim_real, dim_int, dim_bool, dim_pre_vars, dim_z,z_i);
    _sim_vars[modelKey] = sim_vars;
    return sim_vars;
}
shared_ptr<ISimVars> VxWorksFactory::LoadSimVars(size_t dim_real,size_t dim_int,size_t dim_bool, size_t dim_string, size_t dim_pre_vars,size_t dim_z,size_t z_i)
{
    ISimVars* simVars = createSimVars(dim_real,dim_int,dim_bool, dim_string, dim_pre_vars,dim_z,z_i);
    return shared_ptr<ISimVars>(simVars);
}