morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::table::ViewOp Struct Reference

One list-model operation. More...

#include <view_change.hpp>

Public Types

enum class  Kind : std::uint8_t {
  Removed , Moved , Inserted , Changed ,
  Reset
}
 The operation. More...

Public Member Functions

bool operator== (ViewOp const &other) const =default
 Member-wise equality.

Public Attributes

Kind kind = Kind::Reset
 The operation.
std::size_t first = 0
 First row concerned.
std::size_t count = 0
 Rows concerned (1 for Moved, 0 for Reset).
std::size_t to = 0
 Destination of a Moved row, in the list after its removal.

Detailed Description

One list-model operation.

Definition at line 41 of file view_change.hpp.

Member Enumeration Documentation

◆ Kind

enum class morph::table::ViewOp::Kind : std::uint8_t
strong

The operation.

Enumerator
Removed 

count rows at first were removed.

Moved 

The row at first moved to to.

Inserted 

count rows were inserted at first.

Changed 

count rows at first have new content.

Reset 

The whole view was replaced.

Definition at line 43 of file view_change.hpp.

Member Function Documentation

◆ operator==()

bool morph::table::ViewOp::operator== ( ViewOp const & other) const
nodiscarddefault

Member-wise equality.

Parameters
otherThe operation to compare with.
Returns
true when every member matches.

Member Data Documentation

◆ kind

Kind morph::table::ViewOp::kind = Kind::Reset

The operation.

Definition at line 52 of file view_change.hpp.

◆ first

std::size_t morph::table::ViewOp::first = 0

First row concerned.

Definition at line 54 of file view_change.hpp.

◆ count

std::size_t morph::table::ViewOp::count = 0

Rows concerned (1 for Moved, 0 for Reset).

Definition at line 56 of file view_change.hpp.

◆ to

std::size_t morph::table::ViewOp::to = 0

Destination of a Moved row, in the list after its removal.

Definition at line 58 of file view_change.hpp.


The documentation for this struct was generated from the following file: