swift
Loading...
Searching...
No Matches
swift::misc::IOrderableList< OBJ, CONTAINER > Class Template Reference

List of orderable IOrderable objects. More...

#include <orderablelist.h>

Public Member Functions

void sortAscendingByOrder ()
 Sort ascending.
void sortDescendingByOrder ()
 Sort descending.
void resetOrder (int offset=0)
 Set order member to current order.
bool needsOrder () const
 All order values set or missing some?
QList< int > orderValues () const
 All order values IOrderable::order.
CONTAINER withoutItemsOfSameOrder (const CONTAINER &items) const
 Items with order will not be included.
void removeItemsWithSameOrder (const CONTAINER &items)
 Remove the items based on their order IOrderable::order.
void moveTo (const CONTAINER &items, int targetOrder)
 Move items to given order.
void freezeOrder ()
 Current order of list will be new order values.
void freezeOrderReverse ()
 Current reverse order of list will be new order values.
OBJ minOrderOrDefault () const
 Object with min.order or default.
OBJ maxOrderOrDefault () const
 Object with max.order or default.

Protected Member Functions

 IOrderableList ()=default
 Constructor.
const CONTAINER & container () const
 Container.
CONTAINER & container ()
 Container.

Detailed Description

template<class OBJ, class CONTAINER>
class swift::misc::IOrderableList< OBJ, CONTAINER >

List of orderable IOrderable objects.

Remarks
Orerable objects shall implement swift::misc::IOrderable

Definition at line 18 of file orderablelist.h.

Member Function Documentation

◆ container() [1/2]

template<class OBJ, class CONTAINER>
CONTAINER & swift::misc::IOrderableList< OBJ, CONTAINER >::container ( )
inlineprotected

Container.

Definition at line 205 of file orderablelist.h.

◆ container() [2/2]

template<class OBJ, class CONTAINER>
const CONTAINER & swift::misc::IOrderableList< OBJ, CONTAINER >::container ( ) const
inlineprotected

Container.

Definition at line 202 of file orderablelist.h.

◆ freezeOrder()

template<class OBJ, class CONTAINER>
void swift::misc::IOrderableList< OBJ, CONTAINER >::freezeOrder ( )
inline

Current order of list will be new order values.

Definition at line 134 of file orderablelist.h.

◆ freezeOrderReverse()

template<class OBJ, class CONTAINER>
void swift::misc::IOrderableList< OBJ, CONTAINER >::freezeOrderReverse ( )
inline

Current reverse order of list will be new order values.

Definition at line 144 of file orderablelist.h.

◆ maxOrderOrDefault()

template<class OBJ, class CONTAINER>
OBJ swift::misc::IOrderableList< OBJ, CONTAINER >::maxOrderOrDefault ( ) const
inline

Object with max.order or default.

Definition at line 176 of file orderablelist.h.

◆ minOrderOrDefault()

template<class OBJ, class CONTAINER>
OBJ swift::misc::IOrderableList< OBJ, CONTAINER >::minOrderOrDefault ( ) const
inline

Object with min.order or default.

Definition at line 154 of file orderablelist.h.

◆ moveTo()

template<class OBJ, class CONTAINER>
void swift::misc::IOrderableList< OBJ, CONTAINER >::moveTo ( const CONTAINER & items,
int targetOrder )
inline

Move items to given order.

Definition at line 108 of file orderablelist.h.

◆ needsOrder()

template<class OBJ, class CONTAINER>
bool swift::misc::IOrderableList< OBJ, CONTAINER >::needsOrder ( ) const
inline

All order values set or missing some?

Definition at line 44 of file orderablelist.h.

◆ orderValues()

template<class OBJ, class CONTAINER>
QList< int > swift::misc::IOrderableList< OBJ, CONTAINER >::orderValues ( ) const
inline

All order values IOrderable::order.

Definition at line 51 of file orderablelist.h.

◆ removeItemsWithSameOrder()

template<class OBJ, class CONTAINER>
void swift::misc::IOrderableList< OBJ, CONTAINER >::removeItemsWithSameOrder ( const CONTAINER & items)
inline

Remove the items based on their order IOrderable::order.

Definition at line 87 of file orderablelist.h.

◆ resetOrder()

template<class OBJ, class CONTAINER>
void swift::misc::IOrderableList< OBJ, CONTAINER >::resetOrder ( int offset = 0)
inline

Set order member to current order.

Definition at line 34 of file orderablelist.h.

◆ sortAscendingByOrder()

template<class OBJ, class CONTAINER>
void swift::misc::IOrderableList< OBJ, CONTAINER >::sortAscendingByOrder ( )
inline

Sort ascending.

Definition at line 24 of file orderablelist.h.

◆ sortDescendingByOrder()

template<class OBJ, class CONTAINER>
void swift::misc::IOrderableList< OBJ, CONTAINER >::sortDescendingByOrder ( )
inline

Sort descending.

Definition at line 27 of file orderablelist.h.

◆ withoutItemsOfSameOrder()

template<class OBJ, class CONTAINER>
CONTAINER swift::misc::IOrderableList< OBJ, CONTAINER >::withoutItemsOfSameOrder ( const CONTAINER & items) const
inline

Items with order will not be included.

Definition at line 66 of file orderablelist.h.


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