void erase( const PropertyAccessor & pa, const Variant & eraseKey ) { Key key; if (!createKey( pa, key )) { pa.erase( eraseKey ); return; } std::unique_ptr<ReflectedCollectionEraseCommandParameters> commandParameters( new ReflectedCollectionEraseCommandParameters() ); commandParameters->id_ = key.first; commandParameters->path_ = key.second; commandParameters->key_ = eraseKey; const auto itr = commands_.emplace( std::pair< Key, CommandInstancePtr >( key, commandManager_.queueCommand( getClassIdentifier<ReflectedCollectionEraseCommand>(), ObjectHandle( std::move( commandParameters ) ) ) ) ); commandManager_.waitForInstance( itr->second ); commands_.erase( itr ); }