Configuration class for arguments.
More...
#include <configurator.h>
Configuration class for arguments.
This class stores maze generation parameters with safe default values
- Warning
- Always use the constructor or setter methods to ensure proper initialization
◆ configurator() [1/3]
mazes::configurator::configurator |
( |
| ) |
|
|
inlinenoexcept |
Default constructor - initializes all values to safe defaults.
Provides reasonable default values to prevent uninitialized memory access
- Note
- Default values: rows=10, columns=10, levels=1, algo=BINARY_TREE, etc.
◆ configurator() [2/3]
mazes::configurator::configurator |
( |
const configurator & | other | ) |
|
|
defaultnoexcept |
Copy constructor.
- Parameters
-
other | The configurator object to copy from |
◆ configurator() [3/3]
Move constructor
- Parameters
-
other | The configurator object to move from |
◆ algo_id() [1/2]
algo mazes::configurator::algo_id |
( |
| ) |
const |
|
inlinenoexcept |
Get the maze generation algorithm.
- Returns
- The algorithm used for maze generation
◆ algo_id() [2/2]
Set the maze generation algorithm.
- Parameters
-
algorithm | The algorithm to use |
- Returns
- A reference to this configurator
◆ block_id() [1/2]
int mazes::configurator::block_id |
( |
| ) |
const |
|
inlinenoexcept |
Get the block ID.
- Returns
- The block ID
◆ block_id() [2/2]
configurator & mazes::configurator::block_id |
( |
int | block_id | ) |
|
|
inlinenoexcept |
Set the block ID.
- Parameters
-
- Returns
- A reference to this configurator
◆ columns() [1/2]
unsigned int mazes::configurator::columns |
( |
| ) |
const |
|
inlinenoexcept |
Get the number of columns
- Returns
- The number of columns (guaranteed to be > 0)
◆ columns() [2/2]
configurator & mazes::configurator::columns |
( |
unsigned int | columns | ) |
|
|
inlinenoexcept |
Set the number of columns.
- Parameters
-
columns | The number of columns (must be > 0, will be clamped to reasonable limits) |
- Returns
- A reference to this configurator
- Warning
- Values > 10000 will be clamped to prevent memory issues
◆ distances() [1/2]
bool mazes::configurator::distances |
( |
| ) |
const |
|
inlinenoexcept |
Check if distances are calculated.
- Returns
- True if distances are calculated, false otherwise
◆ distances() [2/2]
configurator & mazes::configurator::distances |
( |
bool | distances | ) |
|
|
inlinenoexcept |
Set the distance calculation flag.
- Parameters
-
distances | The distance calculation flag |
- Returns
- A reference to this configurator
◆ help() [1/2]
const std::string & mazes::configurator::help |
( |
| ) |
const |
|
inlinenoexcept |
Get the help message.
- Returns
- The help message
◆ help() [2/2]
configurator & mazes::configurator::help |
( |
std::string | help | ) |
|
|
inlinenoexcept |
Set the help message.
- Parameters
-
- Returns
- A reference to this configurator
◆ is_valid()
bool mazes::configurator::is_valid |
( |
| ) |
const |
|
inlinenoexcept |
Validate all configuration values are within safe limits.
- Returns
- True if all values are valid, false if any are problematic
Checks for potential infinite loop conditions and memory issues
◆ levels() [1/2]
unsigned int mazes::configurator::levels |
( |
| ) |
const |
|
inlinenoexcept |
Get the number of levels.
- Returns
- The number of levels (guaranteed to be > 0)
◆ levels() [2/2]
configurator & mazes::configurator::levels |
( |
unsigned int | levels | ) |
|
|
inlinenoexcept |
Set the number of levels.
- Parameters
-
levels | The number of levels (must be > 0, will be clamped to reasonable limits) |
- Returns
- A reference to this configurator
- Warning
- Values > 1000 will be clamped to prevent memory issues
- Note
- Most mazes are 2D (levels=1), 3D mazes should use moderate level counts
◆ operator=() [1/2]
Move assignment operator.
- Parameters
-
other | The configurator object to move from
|
- Returns
- Reference to this configurator
◆ operator=() [2/2]
Copy assignment operator.
- Parameters
-
other | The configurator object to copy from |
- Returns
- Reference to this configurator
◆ output_id() [1/2]
output mazes::configurator::output_id |
( |
| ) |
const |
|
inlinenoexcept |
Get the output ID.
- Returns
- The output ID
◆ output_id() [2/2]
Set the output ID.
- Parameters
-
- Returns
- A reference to this configurator
◆ reset_to_defaults()
void mazes::configurator::reset_to_defaults |
( |
| ) |
|
|
inlinenoexcept |
Reset all values to safe defaults.
Useful for clearing potentially corrupted configuration
◆ rows() [1/2]
unsigned int mazes::configurator::rows |
( |
| ) |
const |
|
inlinenoexcept |
Get the number of rows.
- Returns
- The number of rows (guaranteed to be > 0)
◆ rows() [2/2]
configurator & mazes::configurator::rows |
( |
unsigned int | rows | ) |
|
|
inlinenoexcept |
Set the number of rows.
- Parameters
-
rows | The number of rows (must be > 0, will be clamped to reasonable limits) |
- Returns
- A reference to this configurator
- Warning
- Values > 10000 will be clamped to prevent memory issues
◆ seed() [1/2]
unsigned int mazes::configurator::seed |
( |
| ) |
const |
|
inlinenoexcept |
Get the random seed.
- Returns
- The random seed
◆ seed() [2/2]
configurator & mazes::configurator::seed |
( |
unsigned int | seed | ) |
|
|
inlinenoexcept |
Set the random seed.
- Parameters
-
seed | The random seed (0 = use random seed) |
- Returns
- A reference to this configurator
◆ version() [1/2]
const std::string & mazes::configurator::version |
( |
| ) |
const |
|
inlinenoexcept |
Get the version string.
- Returns
- The version string
◆ version() [2/2]
configurator & mazes::configurator::version |
( |
std::string | version | ) |
|
|
inlinenoexcept |
Set the version string.
- Parameters
-
version | The version string |
- Returns
- A reference to this configurator
The documentation for this class was generated from the following file: