lipsum-cpp 0.5.4
A basic library written in C++ for generating placeholder Lorem Ipsum text.
Loading...
Searching...
No Matches
lipsum::GeneratorSettings Struct Reference

Settings for lipsum::Generator. More...

#include <generatorsettings.hpp>

Public Member Functions

void change_setting (const std::string &setting, const ArgVec2 &value)
 Change a setting.
void toggle_lazy ()
 Toggle the lazy flag.

Public Attributes

bool lazy = false
 Whether generation will be "lazy".
ArgVec2 word {4, 9}
 The minimum and maximum possible number of words in a sentence fragment.
ArgVec2 frag {1, 3}
 The minimum and maximum possible number of sentence fragments in a sentence.
ArgVec2 sent {5, 8}
 The minimum and maximum possible number of sentences in a paragraph.
ArgVec2 para {1, 4}
 The minimum and maximum possible number of paragraphs in a text.
ArgVec2 point {3, 5}
 The minimum and maximum possible number of points in lists or statements in code blocks.
ArgVec2 wordURL {2, 5}
 The minimum and maximum possible number of words at the end of a URL, in a heading, in slugs, or characters in code block namespaces.
ArgVec2 wordFmt {4, 8}
 The minimum and maximum possible number of words in a sentence fragment in formatted sentences.
ArgVec2 fragFmt {1, 2}
 The minimum and maximum possible number of sentence fragments in a formatted sentence.
ArgVec2 level {2, 4}
 The minimum and maximum possible heading levels, excluding the main heading.
ArgVec2 jsonLength {2, 5}
 The minimum and maximum possible number of items in JSON objects and arrays.
ArgVec2 csvRows {10, 15}
 The minimum and maximum possible number of rows in CSV data.
ArgVec2 csvCols {5, 8}
 The minimum and maximum possible number of columns in CSV data.

Detailed Description

Settings for lipsum::Generator.

Since
0.4.5

This is a struct storing settings used in lipsum::Generator.

Member Function Documentation

◆ change_setting()

void lipsum::GeneratorSettings::change_setting ( const std::string & setting,
const ArgVec2 & value )

Change a setting.

Since
0.4.5

Change a setting for generation. Valid setting names include "word", "frag", "sent", "para", "point", "wordFmt", "fragFmt", "wordURL", "level", and "jsonLength". If an invalid setting name is used, raise a warning and ignore.

Parameters
settingThe name of the setting.
valueThe new value for the setting.

◆ toggle_lazy()

void lipsum::GeneratorSettings::toggle_lazy ( )

Toggle the lazy flag.

Since
0.5.3

Toggle the lazy flag. If "lazy" is false, set it to true; else, set it to false.

Member Data Documentation

◆ csvCols

ArgVec2 lipsum::GeneratorSettings::csvCols {5, 8}

The minimum and maximum possible number of columns in CSV data.

Since
0.5.2

◆ csvRows

ArgVec2 lipsum::GeneratorSettings::csvRows {10, 15}

The minimum and maximum possible number of rows in CSV data.

Since
0.5.2

◆ frag

ArgVec2 lipsum::GeneratorSettings::frag {1, 3}

The minimum and maximum possible number of sentence fragments in a sentence.

Since
0.4.5

◆ fragFmt

ArgVec2 lipsum::GeneratorSettings::fragFmt {1, 2}

The minimum and maximum possible number of sentence fragments in a formatted sentence.

Since
0.4.5

◆ jsonLength

ArgVec2 lipsum::GeneratorSettings::jsonLength {2, 5}

The minimum and maximum possible number of items in JSON objects and arrays.

Since
0.4.5

◆ lazy

bool lipsum::GeneratorSettings::lazy = false

Whether generation will be "lazy".

Since
0.5.3

◆ level

ArgVec2 lipsum::GeneratorSettings::level {2, 4}

The minimum and maximum possible heading levels, excluding the main heading.

Since
0.4.5

◆ para

ArgVec2 lipsum::GeneratorSettings::para {1, 4}

The minimum and maximum possible number of paragraphs in a text.

Since
0.4.5

◆ point

ArgVec2 lipsum::GeneratorSettings::point {3, 5}

The minimum and maximum possible number of points in lists or statements in code blocks.

Since
0.4.5

◆ sent

ArgVec2 lipsum::GeneratorSettings::sent {5, 8}

The minimum and maximum possible number of sentences in a paragraph.

Since
0.4.5

◆ word

ArgVec2 lipsum::GeneratorSettings::word {4, 9}

The minimum and maximum possible number of words in a sentence fragment.

Since
0.4.5

◆ wordFmt

ArgVec2 lipsum::GeneratorSettings::wordFmt {4, 8}

The minimum and maximum possible number of words in a sentence fragment in formatted sentences.

Since
0.4.5

◆ wordURL

ArgVec2 lipsum::GeneratorSettings::wordURL {2, 5}

The minimum and maximum possible number of words at the end of a URL, in a heading, in slugs, or characters in code block namespaces.

Since
0.4.5

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