MCPcopy Create free account
hub / github.com/cuberite/cuberite / getMemberNames

Method getMemberNames

lib/jsoncpp/src/lib_json/json_value.cpp:1213–1235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1211#endif
1212
1213Value::Members
1214Value::getMemberNames() const
1215{
1216 JSON_ASSERT( type_ == nullValue || type_ == objectValue );
1217 if ( type_ == nullValue )
1218 return Value::Members();
1219 Members members;
1220 members.reserve( value_.map_->size() );
1221#ifndef JSON_VALUE_USE_INTERNAL_MAP
1222 ObjectValues::const_iterator it = value_.map_->begin();
1223 ObjectValues::const_iterator itEnd = value_.map_->end();
1224 for ( ; it != itEnd; ++it )
1225 members.push_back( std::string( (*it).first.c_str() ) );
1226#else
1227 ValueInternalMap::IteratorState it;
1228 ValueInternalMap::IteratorState itEnd;
1229 value_.map_->makeBeginIterator( it );
1230 value_.map_->makeEndIterator( itEnd );
1231 for ( ; !ValueInternalMap::equals( it, itEnd ); ValueInternalMap::increment(it) )
1232 members.push_back( std::string( ValueInternalMap::key( it ) ) );
1233#endif
1234 return members;
1235}
1236//
1237//# ifdef JSON_USE_CPPTL
1238//EnumMemberNames

Callers 1

writeValueMethod · 0.80

Calls 6

stringClass · 0.85
keyClass · 0.85
sizeMethod · 0.80
beginMethod · 0.80
endMethod · 0.80
c_strMethod · 0.80

Tested by

no test coverage detected