|
ORE Studio 0.0.4
|
Manages pagination state across shell commands. More...
#include <pagination_context.hpp>

Public Member Functions | |
| std::uint32_t | page_size () const |
| Get the current page size. | |
| void | set_page_size (std::uint32_t size) |
| Set the page size. | |
| entity_page_state & | state_for (const std::string &entity_name) |
| Get or create pagination state for an entity. | |
| const std::string & | last_entity () const |
| Get the last entity that was listed. | |
| void | set_last_entity (const std::string &name) |
| Set the last entity that was listed. | |
| void | register_list_callback (const std::string &entity_name, list_callback callback) |
| Register a callback for listing an entity. | |
| const list_callback * | get_list_callback (const std::string &entity_name) const |
| Get the list callback for an entity. | |
Manages pagination state across shell commands.
Tracks per-entity pagination state (offset, total count) and maintains a registry of callbacks to re-invoke list commands during navigation.
| std::uint32_t page_size | ( | ) | const |
Get the current page size.

| void set_page_size | ( | std::uint32_t | size | ) |
Set the page size.
| size | The number of records per page. |

| entity_page_state & state_for | ( | const std::string & | entity_name | ) |
Get or create pagination state for an entity.
| entity_name | The name of the entity (e.g., "currencies"). |

| const std::string & last_entity | ( | ) | const |
Get the last entity that was listed.

| void set_last_entity | ( | const std::string & | name | ) |
Set the last entity that was listed.
| name | The name of the entity. |

| void register_list_callback | ( | const std::string & | entity_name, |
| list_callback | callback | ||
| ) |
Register a callback for listing an entity.
| entity_name | The name of the entity. |
| callback | The callback to invoke for listing. |

| const list_callback * get_list_callback | ( | const std::string & | entity_name | ) | const |
Get the list callback for an entity.
| entity_name | The name of the entity. |
