本文整理汇总了C++中list::const_iterator类的典型用法代码示例。如果您正苦于以下问题:C++ const_iterator类的具体用法?C++ const_iterator怎么用?C++ const_iterator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了const_iterator类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: initList
void ValueImpl::initList(const List& fl)
{
for (List::const_iterator iter = fl.begin();
iter != fl.end(); iter++) {
const FieldValue& fvalue(*iter->get());
uint8_t amqType = fvalue.getType();
if (amqType == 0x32) {
Value* subval(new Value(TYPE_UINT64));
subval->setUint64(fvalue.get<int64_t>());
appendToList(subval);
} else if ((amqType & 0xCF) == 0x02) {
Value* subval(new Value(TYPE_UINT32));
switch (amqType) {
case 0x02 : subval->setUint(fvalue.get<int>()); break; // uint8
case 0x12 : subval->setUint(fvalue.get<int>()); break; // uint16
case 0x22 : subval->setUint(fvalue.get<int>()); break; // uint32
}
appendToList(subval);
} else if (amqType == 0x31) { // int64
Value* subval(new Value(TYPE_INT64));
subval->setInt64(fvalue.get<int64_t>());
appendToList(subval);
} else if ((amqType & 0xCF) == 0x01) { // 0x01:int8, 0x11:int16, 0x21:int32
Value* subval(new Value(TYPE_INT32));
subval->setInt((int32_t)fvalue.get<int>());
appendToList(subval);
} else if (amqType == 0x85 || amqType == 0x95) {
Value* subval(new Value(TYPE_LSTR));
subval->setString(fvalue.get<string>().c_str());
appendToList(subval);
} else if (amqType == 0x23 || amqType == 0x33) {
Value* subval(new Value(TYPE_DOUBLE));
subval->setDouble(fvalue.get<double>());
appendToList(subval);
} else if (amqType == 0xa8) {
FieldTable subFt;
bool valid = qpid::framing::getEncodedValue<FieldTable>(*iter, subFt);
if (valid) {
Value* subval(new Value(TYPE_MAP));
subval->impl->initMap(subFt);
appendToList(subval);
}
} else if (amqType == 0xa9) {
List subList;
bool valid = qpid::framing::getEncodedValue<List>(*iter, subList);
if (valid) {
Value *subVal(new Value(TYPE_LIST));
subVal->impl->initList(subList);
appendToList(subVal);
}
} else if (amqType == 0x08) {
Value* subval(new Value(TYPE_BOOL));
subval->setBool(fvalue.get<int>() ? true : false);
appendToList(subval);
} else {
QPID_LOG(error, "Unable to decode unsupported AMQP typecode =" << amqType);
}
}
}
开发者ID:cajus,项目名称:qpid-cpp-debian,代码行数:60,代码来源:ValueImpl.cpp
示例2: connectPeerEndpoints
void connectPeerEndpoints (std::vector <IPAddress> const& list)
{
typedef std::vector <IPAddress> List;
for (List::const_iterator iter (list.begin());
iter != list.end(); ++iter)
peerConnect (iter->withPort (0), iter->port());
}
开发者ID:DaiLiRong,项目名称:rippled,代码行数:8,代码来源:Peers.cpp
示例3: find
Factory* find (std::string const& name) const
{
for (List::const_iterator iter (m_list.begin ());
iter != m_list.end (); ++iter)
if ((*iter)->getName().compareIgnoreCase (name) == 0)
return iter->get();
return nullptr;
}
开发者ID:12w21,项目名称:rippled,代码行数:8,代码来源:Manager.cpp
示例4: getFileNameSuffix
docstring BranchList::getFileNameSuffix() const
{
docstring result;
List::const_iterator it = list.begin();
for (; it != list.end(); ++it) {
if (it->isSelected() && it->hasFileNameSuffix())
result += "-" + it->branch();
}
return support::subst(result, from_ascii("/"), from_ascii("_"));
}
开发者ID:cburschka,项目名称:lyx,代码行数:10,代码来源:BranchList.cpp
示例5: WriteMessageBody
int ReportVisualSensorCapabilities::WriteMessageBody(Packet& packet) const
{
unsigned int startPos = packet.GetWritePos();
UShort count = (UShort)mSensorList.size();
List::const_iterator sensor = mSensorList.begin();
packet.Write(count);
while(sensor != mSensorList.end())
{
sensor->WriteMessageBody(packet);
sensor++;
}
return packet.GetWritePos() - startPos;
}
开发者ID:jarekAIM,项目名称:IGVC2015,代码行数:13,代码来源:ReportVisualSensorCapabilities.cpp
示例6: PrintMessageBody
void SetAnalogVideoSensorConfigurations::PrintMessageBody() const
{
std::cout << "Sensor Count: " << mSensorList.size() << std::endl;
UShort count = (UShort)mSensorList.size();
List::const_iterator sensor = mSensorList.begin();
while(sensor != mSensorList.end())
{
std::cout << "<Sensor>" << std::endl;
sensor->PrintSensorFields();
std::cout << "</Sensor>" << std::endl;
sensor++;
}
}
开发者ID:jarekAIM,项目名称:IGVC2015,代码行数:13,代码来源:SetAnalogVideoSensorConfigurations.cpp
示例7: PrintMessageBody
void QueryRangeSensorCapabilities::PrintMessageBody() const
{
std::cout << "Sensor Count: " << mSensorList.size() << std::endl;
UShort count = (UShort)mSensorList.size();
List::const_iterator sensor = mSensorList.begin();
while(sensor != mSensorList.end())
{
std::cout << "<Sensor>" << std::endl;
sensor->PrintSensorFields();
std::cout << "</Sensor>" << std::endl;
sensor++;
}
}
开发者ID:jarekAIM,项目名称:IGVC2015,代码行数:13,代码来源:QueryRangeSensorCapabilities.cpp
示例8: printf
void
triggers::print (const std::string & seqname) const
{
printf("sequence '%s' triggers:\n", seqname.c_str());
for (List::const_iterator i = m_triggers.begin(); i != m_triggers.end(); ++i)
{
printf
(
" tick_start = %ld; tick_end = %ld; offset = %ld; selected = %s\n",
i->tick_start(), i->tick_end(), i->offset(),
bool_string(i->selected())
);
}
}
开发者ID:danielappelt,项目名称:sequencer64,代码行数:14,代码来源:triggers.cpp
示例9: WriteMessageBody
int QueryStillImageSensorConfigurations::WriteMessageBody(Packet& packet) const
{
UInt startPos = packet.GetWritePos();
UShort count = (UShort)mSensorList.size();
List::const_iterator stillImageSensorConfigurations = mSensorList.begin();
packet.Write(count);
while(stillImageSensorConfigurations != mSensorList.end())
{
packet.Write(stillImageSensorConfigurations->GetSensorId()); //required
packet.Write(stillImageSensorConfigurations->GetPresenceVector()); //required
stillImageSensorConfigurations++;
}
return packet.GetWritePos() - startPos;
}
开发者ID:jarekAIM,项目名称:IGVC2015,代码行数:15,代码来源:QueryStillImageSensorConfigurations.cpp
示例10: WriteMessageBody
int QueryRangeSensorCapabilities::WriteMessageBody(Packet& packet) const
{
UInt startPos = packet.GetWritePos();
UShort count = (UShort)mSensorList.size();
List::const_iterator sensor = mSensorList.begin();
packet.Write(count);
while(sensor != mSensorList.end())
{
packet.Write(sensor->GetSensorId()); //required
packet.Write(sensor->GetPresenceVector()); //required
sensor++;
}
return packet.GetWritePos() - startPos;
}
开发者ID:jarekAIM,项目名称:IGVC2015,代码行数:15,代码来源:QueryRangeSensorCapabilities.cpp
示例11: WriteMessageBody
int SetAnalogVideoSensorConfigurations::WriteMessageBody(Packet& packet) const
{
UInt startPos = packet.GetWritePos();
Byte requestId = mRequestId;
UShort count = (UShort)mSensorList.size();
List::const_iterator sensor = mSensorList.begin();
packet.Write(requestId);
packet.Write(count);
while(sensor != mSensorList.end())
{
sensor->WriteMessageBody(packet);
sensor++;
}
return packet.GetWritePos() - startPos;
}
开发者ID:jarekAIM,项目名称:IGVC2015,代码行数:15,代码来源:SetAnalogVideoSensorConfigurations.cpp
示例12: WriteMessageBody
int QueryVisualSensorConfigurations::WriteMessageBody(Packet& packet) const
{
UInt startPos = packet.GetWritePos();
UShort count = (UShort)mSensorList.size();
List::const_iterator visualSensorConfiguration = mSensorList.begin();
packet.Write(count);
while(visualSensorConfiguration != mSensorList.end())
{
packet.Write(visualSensorConfiguration->GetSensorID()); //required
packet.Write(visualSensorConfiguration->GetPresenceVector()); //required
visualSensorConfiguration++;
}
return packet.GetWritePos() - startPos;
}
开发者ID:jarekAIM,项目名称:IGVC2015,代码行数:15,代码来源:QueryVisualSensorConfigurations.cpp
示例13: IsLargeDataSet
bool ReportVisualSensorCapabilities::IsLargeDataSet(const UInt maxPayloadSize) const
{
//Quick Check to possibly avoid the time consuming loop (assume worst case of all fields supported)
if(maxPayloadSize > (BYTE_SIZE * 10 + USHORT_SIZE * 6 + UINT_SIZE * 2) * mSensorList.size())
{
return false;
}
UInt currentSize = 0;
List::const_iterator iter = mSensorList.begin();
while(iter != mSensorList.end())
{
currentSize += iter->GetSize();
iter++;
}
return currentSize > maxPayloadSize;
}
开发者ID:jarekAIM,项目名称:IGVC2015,代码行数:18,代码来源:ReportVisualSensorCapabilities.cpp
示例14: while
std::ostream & OptionChecker::str_s(std::ostream & os) const
{
os << this->checker_name() << '(';
str_type sep = "";
if(! this->_options.empty())
{
List::const_iterator i = this->_options.begin();
os << i->grepr(ReprType::CONFIGSPEC);
sep = ", ";
while(++i != this->_options.end())
{
os << sep << i->grepr(ReprType::CONFIGSPEC);
}
}
if(this->_has_default)
{
os << sep << "default=";
this->_default.grepr_s(os, ReprType::CONFIGSPEC);
}
os << ')';
return os;
}
开发者ID:simone-campagna,项目名称:Configment,代码行数:22,代码来源:checkers.cpp
示例15: highestInRange
FontSize FontList::highestInRange(pos_type startpos, pos_type endpos,
FontSize def_size) const
{
if (list_.empty())
return def_size;
List::const_iterator end_it = fontIterator(endpos);
const_iterator const end = list_.end();
if (end_it != end)
++end_it;
List::const_iterator cit = fontIterator(startpos);
FontSize maxsize = FONT_SIZE_TINY;
for (; cit != end_it; ++cit) {
FontSize size = cit->font().fontInfo().size();
if (size == FONT_SIZE_INHERIT)
size = def_size;
if (size > maxsize && size <= FONT_SIZE_HUGER)
maxsize = size;
}
return maxsize;
}
开发者ID:,项目名称:,代码行数:23,代码来源:
示例16: add
//---------------------------------------------------------------
void InputList::add() const
{
// write inputs
for ( List::const_iterator it = mList.begin(); it != mList.end(); ++it )
{
mSW->openElement ( CSWC::CSW_ELEMENT_INPUT );
mSW->appendAttribute ( CSWC::CSW_ATTRIBUTE_SEMANTIC, getSemanticString ( it->getSemantic() ) );
mSW->appendURIAttribute ( CSWC::CSW_ATTRIBUTE_SOURCE, it->getSource() );
if ( it->getOffset() >= 0 )
mSW->appendAttribute ( CSWC::CSW_ATTRIBUTE_OFFSET, ( unsigned long ) it->getOffset() );
if ( it->getSet() >= 0 )
mSW->appendAttribute ( CSWC::CSW_ATTRIBUTE_SET, ( unsigned long ) it->getSet() );
mSW->closeElement();
}
}
开发者ID:3dfreeman,项目名称:OpenCOLLADA,代码行数:19,代码来源:COLLADASWInputList.cpp
示例17: hasChangeInRange
bool FontList::hasChangeInRange(pos_type pos, int len) const
{
List::const_iterator cit = fontIterator(pos);
return cit == list_.end() || pos + len - 1 <= cit->pos();
}
开发者ID:,项目名称:,代码行数:5,代码来源:
注:本文中的list::const_iterator类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论