本文整理汇总了C++中ParametersMap::insert方法的典型用法代码示例。如果您正苦于以下问题:C++ ParametersMap::insert方法的具体用法?C++ ParametersMap::insert怎么用?C++ ParametersMap::insert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParametersMap
的用法示例。
在下文中一共展示了ParametersMap::insert方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: run
ParametersMap VDVServersListService::run(
std::ostream& stream,
const Request& request
) const {
ParametersMap map;
if(_serverFilter.get())
{
boost::shared_ptr<ParametersMap> serverPM(new ParametersMap);
_serverFilter->toParametersMap(*serverPM, true);
map.insert(TAG_SERVER, serverPM);
}
else
{
BOOST_FOREACH(
const VDVServer::Registry::value_type& server,
Env::GetOfficialEnv().getRegistry<VDVServer>()
){
boost::shared_ptr<ParametersMap> serverPM(new ParametersMap);
server.second->toParametersMap(*serverPM, true);
map.insert(TAG_SERVER, serverPM);
}
}
return map;
}
示例2: init
bool DataRecorder::init(const QString & path, bool recordInRAM)
{
UScopeMutex scope(memoryMutex_);
if(!memory_)
{
ParametersMap customParameters;
customParameters.insert(ParametersPair(Parameters::kMemRehearsalSimilarity(), "1.0")); // desactivate rehearsal
customParameters.insert(ParametersPair(Parameters::kKpWordsPerImage(), "-1")); // desactivate keypoints extraction
customParameters.insert(ParametersPair(Parameters::kMemBinDataKept(), "true")); // to keep images
if(!recordInRAM)
{
customParameters.insert(ParametersPair(Parameters::kDbSqlite3InMemory(), "false"));
}
memory_ = new Memory();
if(!memory_->init(path.toStdString(), true, customParameters))
{
delete memory_;
memory_ = 0;
UERROR("Error initializing the memory.");
return false;
}
path_ = path;
return true;
}
else
{
UERROR("Already initialized, close it first.");
return false;
}
}
示例3: getParametersMap
ParametersMap UpdateProfileAction::getParametersMap() const
{
ParametersMap map;
if(_profile.get()) map.insert(PARAMETER_PROFILE_ID, _profile->getKey());
map.insert(PARAMETER_NAME, _name);
return map;
}
示例4: _getParametersMap
ParametersMap OrService::_getParametersMap() const
{
ParametersMap map;
map.insert(PARAMETER_LEFT, _left);
map.insert(PARAMETER_RIGHT, _right);
return map;
}
示例5: _getParametersMap
ParametersMap AndFunction::_getParametersMap() const
{
ParametersMap map;
map.insert(PARAMETER_LEFT, _left);
map.insert(PARAMETER_RIGHT, _right);
return map;
}
示例6: getParametersMap
ParametersMap FreeDRTAreaUpdateAction::getParametersMap() const
{
ParametersMap map;
if(_area.get())
{
map.insert(PARAMETER_AREA_ID, _area->getKey());
}
if(_name)
{
map.insert(PARAMETER_NAME, *_name);
}
if(_cities)
{
map.insert(PARAMETER_CITIES, FreeDRTAreaTableSync::SerializeCities(*_cities));
}
if(_stopAreas)
{
map.insert(PARAMETER_STOP_AREAS, FreeDRTAreaTableSync::SerializeStopAreas(*_stopAreas));
}
if(_line && _line->get())
{
map.insert(PARAMETER_COMMERCIAL_LINE_ID, (*_line)->getKey());
}
return map;
}
示例7: pnh
MapOptimizer() :
mapFrameId_("map"),
odomFrameId_("odom"),
globalOptimization_(true),
optimizeFromLastNode_(false),
mapToOdom_(rtabmap::Transform::getIdentity()),
transformThread_(0)
{
ros::NodeHandle nh;
ros::NodeHandle pnh("~");
double epsilon = 0.0;
bool robust = true;
bool slam2d =false;
int strategy = 0; // 0=TORO, 1=g2o, 2=GTSAM
int iterations = 100;
bool ignoreVariance = false;
pnh.param("map_frame_id", mapFrameId_, mapFrameId_);
pnh.param("odom_frame_id", odomFrameId_, odomFrameId_);
pnh.param("iterations", iterations, iterations);
pnh.param("ignore_variance", ignoreVariance, ignoreVariance);
pnh.param("global_optimization", globalOptimization_, globalOptimization_);
pnh.param("optimize_from_last_node", optimizeFromLastNode_, optimizeFromLastNode_);
pnh.param("epsilon", epsilon, epsilon);
pnh.param("robust", robust, robust);
pnh.param("slam_2d", slam2d, slam2d);
pnh.param("strategy", strategy, strategy);
UASSERT(iterations > 0);
ParametersMap parameters;
parameters.insert(ParametersPair(Parameters::kOptimizerStrategy(), uNumber2Str(strategy)));
parameters.insert(ParametersPair(Parameters::kOptimizerEpsilon(), uNumber2Str(epsilon)));
parameters.insert(ParametersPair(Parameters::kOptimizerIterations(), uNumber2Str(iterations)));
parameters.insert(ParametersPair(Parameters::kOptimizerRobust(), uBool2Str(robust)));
parameters.insert(ParametersPair(Parameters::kOptimizerSlam2D(), uBool2Str(slam2d)));
parameters.insert(ParametersPair(Parameters::kOptimizerVarianceIgnored(), uBool2Str(ignoreVariance)));
optimizer_ = Optimizer::create(parameters);
double tfDelay = 0.05; // 20 Hz
bool publishTf = true;
pnh.param("publish_tf", publishTf, publishTf);
pnh.param("tf_delay", tfDelay, tfDelay);
mapDataTopic_ = nh.subscribe("mapData", 1, &MapOptimizer::mapDataReceivedCallback, this);
mapDataPub_ = nh.advertise<rtabmap_ros::MapData>(nh.resolveName("mapData")+"_optimized", 1);
mapGraphPub_ = nh.advertise<rtabmap_ros::MapGraph>(nh.resolveName("mapData")+"Graph_optimized", 1);
if(publishTf)
{
ROS_INFO("map_optimizer will publish tf between frames \"%s\" and \"%s\"", mapFrameId_.c_str(), odomFrameId_.c_str());
ROS_INFO("map_optimizer: map_frame_id = %s", mapFrameId_.c_str());
ROS_INFO("map_optimizer: odom_frame_id = %s", odomFrameId_.c_str());
ROS_INFO("map_optimizer: tf_delay = %f", tfDelay);
transformThread_ = new boost::thread(boost::bind(&MapOptimizer::publishLoop, this, tfDelay));
}
}
示例8: _getParametersMap
ParametersMap MapRequest::_getParametersMap() const
{
ParametersMap map;
map.insert(OUTPUT_PARAMETER, _output);
map.insert(DATA_PARAMETER, _data);
map.insert(MAP_PARAMETER, _query);
map.insert(PARAMETER_USE_ENVIRONMENT, _useEnvironment);
return map;
}
示例9: getParametersMap
ParametersMap AlarmAddLinkAction::getParametersMap() const
{
ParametersMap map;
map.insert(PARAMETER_ALARM_ID, _alarm.get() ? _alarm->getKey() : RegistryKeyType(0));
map.insert(PARAMETER_RECIPIENT_KEY, _recipientKey);
map.insert(PARAMETER_OBJECT_ID, _objectId);
map.insert(PARAMETER_PARAMETER, _parameter);
return map;
}
示例10: getParametersMap
ParametersMap DBLogPurgeAction::getParametersMap() const
{
ParametersMap map;
if(_dbLog.get())
{
map.insert(PARAMETER_LOG_KEY, _dbLog->getFactoryKey());
}
map.insert(PARAMETER_END_DATE, _endDate);
return map;
}
示例11: getParametersMap
ParametersMap HikingTrailStopRemoveAction::getParametersMap() const
{
ParametersMap map;
if(_trail.get())
{
map.insert(PARAMETER_TRAIL_ID, _trail->getKey());
map.insert(PARAMETER_RANK, _rank);
}
return map;
}
示例12: getParametersMap
ParametersMap TimetableRowGroupItemAddAction::getParametersMap() const
{
ParametersMap map;
map.insert(PARAMETER_RANK, _rank);
if(_rowGroup.get())
{
map.insert(PARAMETER_ROWGROUP_ID, _rowGroup->getKey());
}
return map;
}
示例13: getParametersMap
ParametersMap DisplayScreenRemovePhysicalStopAction::getParametersMap() const
{
ParametersMap map;
if (_stop.get())
{
map.insert(PARAMETER_PHYSICAL, _stop->getKey());
}
if(_screen.get()) map.insert(PARAMETER_SCREEN_ID, _screen->getKey());
return map;
}
示例14: _getParametersMap
ParametersMap SubStrFunction::_getParametersMap() const
{
ParametersMap map;
map.insert(PARAMETER_TEXT, _text);
map.insert(PARAMETER_FIRST, _first);
if(_size)
{
map.insert(PARAMETER_LENGTH, *_size);
}
return map;
}
示例15: getParametersMap
ParametersMap TimetableSetPhysicalStopAction::getParametersMap() const
{
ParametersMap map;
if(_timetable.get())
{
map.insert(PARAMETER_TIMETABLE_ID, _timetable->getKey());
}
if(_physicalStop.get())
{
map.insert(PARAMETER_PHYSICAL_STOP_ID, _physicalStop->getKey());
}
return map;
}