ORE Studio 0.0.4
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
navigation_commands Class Reference

Manages pagination navigation commands. More...

#include <navigation_commands.hpp>

Collaboration diagram for navigation_commands:
Collaboration graph

Static Public Member Functions

static void register_commands (cli::Menu &root_menu, pagination_context &pagination)
 Register navigation commands.
 
static void process_next (std::ostream &out, pagination_context &pagination)
 Move to the next page.
 
static void process_prev (std::ostream &out, pagination_context &pagination)
 Move to the previous page.
 
static void process_first (std::ostream &out, pagination_context &pagination)
 Jump to the first page.
 
static void process_last (std::ostream &out, pagination_context &pagination)
 Jump to the last page.
 
static void process_page_size (std::ostream &out, pagination_context &pagination, std::uint32_t size=0)
 Get or set the page size.
 

Detailed Description

Manages pagination navigation commands.

Provides commands for navigating through paginated result sets:

Member Function Documentation

◆ register_commands()

void register_commands ( cli::Menu &  root_menu,
pagination_context pagination 
)
static

Register navigation commands.

Adds pagination navigation commands to the root menu.

Parameters
root_menuThe root menu to add commands to.
paginationThe pagination context for state management.

◆ process_next()

void process_next ( std::ostream &  out,
pagination_context pagination 
)
static

Move to the next page.

Advances the offset by page_size and re-invokes the list command.

Parameters
outOutput stream for results.
paginationThe pagination context.
Here is the caller graph for this function:

◆ process_prev()

void process_prev ( std::ostream &  out,
pagination_context pagination 
)
static

Move to the previous page.

Decrements the offset by page_size and re-invokes the list command.

Parameters
outOutput stream for results.
paginationThe pagination context.
Here is the caller graph for this function:

◆ process_first()

void process_first ( std::ostream &  out,
pagination_context pagination 
)
static

Jump to the first page.

Sets offset to 0 and re-invokes the list command.

Parameters
outOutput stream for results.
paginationThe pagination context.
Here is the caller graph for this function:

◆ process_last()

void process_last ( std::ostream &  out,
pagination_context pagination 
)
static

Jump to the last page.

Sets offset to show the last page and re-invokes the list command.

Parameters
outOutput stream for results.
paginationThe pagination context.
Here is the caller graph for this function:

◆ process_page_size()

void process_page_size ( std::ostream &  out,
pagination_context pagination,
std::uint32_t  size = 0 
)
static

Get or set the page size.

Without argument, displays the current page size. With argument, sets the page size and resets all entity offsets.

Parameters
outOutput stream for results.
paginationThe pagination context.
sizeOptional new page size (0 means just show current).
Here is the caller graph for this function: