SE
Size: a a a
SE
AT
МВ
1. beginInsertRows(....)
2. // Emplacing some data to container
3. endInsertRows()
template<typename Functor>
struct ExitScope {
private:
Functor _scope_exit_functor;
public:
ExitScope(Functor f): _scope_exit_functor(f) {}
~ExitScope() { if (_scope_exit_functor) _scope_exit_functor(); }
}
...
beginInsertRows(....);
ExitScope scope([this]() {
endInsertRows();
}
// Emplacing some data to container
МВ
AT
AT
template<typename Functor>
struct ExitScope {
private:
Functor _scope_exit_functor;
public:
ExitScope(Functor f): _scope_exit_functor(f) {}
~ExitScope() { if (_scope_exit_functor) _scope_exit_functor(); }
}
...
beginInsertRows(....);
ExitScope scope([this]() {
endInsertRows();
}
// Emplacing some data to container
VF
AT
SE
VF
РБ
МВ
A
РБ
РБ
PM
РБ
PM
PM
РБ