本文整理汇总了C++中rho::Vector::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ Vector::begin方法的具体用法?C++ Vector::begin怎么用?C++ Vector::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rho::Vector
的用法示例。
在下文中一共展示了Vector::begin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getProperties
void CSensorImpl::getProperties(const rho::Vector<rho::String>& arrayofNames, rho::apiGenerator::CMethodResult& oResult)
{
LOG(TRACE) + "Received request for get properties : " + m_sensorId;
if (NULL == m_rawSensor)
{
oResult.setError("No sensor found. Cannot get properties");
} else
{
rho::Hashtable<rho::String, rho::String> propsHash;
for (rho::Vector<rho::String>::const_iterator namesIterator = arrayofNames.begin(); namesIterator != arrayofNames.end(); namesIterator++)
{
if (_stricmp((*namesIterator).c_str(), "minimumGap") == 0)
{
propsHash.put(*namesIterator, rho::common::convertToStringA<int>(this->m_rawSensor->getMinimumGap()));
} else if (_stricmp((*namesIterator).c_str(), "type") == 0)
{
propsHash.put(*namesIterator, this->m_rawSensor->getType());
} else if (_stricmp((*namesIterator).c_str(), "status") == 0)
{
propsHash.put(*namesIterator, this->m_rawSensor->getStatus());
} else
{
propsHash.put(*namesIterator, "Invalid attribute");
}
}
oResult.set(propsHash);
}
}
示例2: RAWTRACE
jobject rho_cast_helper<jobject, rho::Vector<std::string> >::operator()(JNIEnv* env, const rho::Vector<std::string>& stringVector)
{
RAWTRACE("rho_cast<jobject, HStringVector>");
if (!initConvertor(env)) return 0;
jobject jArray = env->NewObject(clsArrayList, midArrayList);
if(!jArray) return 0;
for(std::vector<std::string>::const_iterator iter = stringVector.begin(); iter != stringVector.end(); ++iter)
{
jhstring jhItem = rho_cast<jstring>(env, *iter);
env->CallBooleanMethod(jArray, midArrayListAdd, jhItem.get());
}
return jArray;
}