本文整理汇总了C++中json_spirit::Object::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ Object::begin方法的具体用法?C++ Object::begin怎么用?C++ Object::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类json_spirit::Object
的用法示例。
在下文中一共展示了Object::begin方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: hasName
bool GdaJson::hasName(const json_spirit::Object& obj, const wxString& name)
{
std::string std_name(name.ToStdString());
for (json_spirit::Object::const_iterator i=obj.begin(); i!=obj.end(); ++i)
{
if (i->name_ == std_name) return true;
}
return false;
}
示例2: ExtractField
bool ExtractField(json_spirit::Object &obj, const std::string field, json_spirit::Value &v)
{
for (std::vector<json_spirit::Pair>::iterator i = obj.begin(); i != obj.end(); ++i)
{
if (i->name_ == field)
{
v = i->value_;
obj.erase(i);
return true;
}
}
return false;
}
示例3: findValue
bool GdaJson::findValue(const json_spirit::Object& input,
json_spirit::Value& output,
const wxString& name)
{
std::string std_name(name.ToStdString());
const json_spirit::Object o=input;
for (json_spirit::Object::const_iterator i=o.begin(); i!=o.end(); ++i)
{
if (i->name_ == std_name) {
output = i->value_;
return true;
}
}
return false;
}
示例4: getStrValFromObj
wxString GdaJson::getStrValFromObj(const json_spirit::Object& obj,
const wxString& name)
{
std::string std_name(name.ToStdString());
for (json_spirit::Object::const_iterator i=obj.begin(); i!=obj.end(); ++i)
{
if (i->name_ == std_name) {
if (i->value_.type() == json_spirit::str_type) {
return wxString(i->value_.get_str());
}
return "";
}
}
return "";
}
示例5: refreshTurboAddressTable
void refreshTurboAddressTable()
{
cachedTurboAddressTable.clear();
int rank = 0;
for (json_spirit::Object::iterator it = allTurbos.begin(); it != allTurbos.end(); ++it)
{
++rank;
cachedTurboAddressTable.append(TurboAddressTableEntry(rank, QString::fromStdString(it->name_),
it->value_.get_int()));
}
// qLowerBound() and qUpperBound() require
// our cachedTurboAddressTable list to be sorted in asc order
qSort(cachedTurboAddressTable.begin(), cachedTurboAddressTable.end(),
TurboAddressTableEntryLessThan());
}