The Battle for Wesnoth  1.19.7+dev
Public Member Functions | Private Attributes | List of all members
markov_generator Class Reference

#include <markov_generator.hpp>

Inheritance diagram for markov_generator:

Public Member Functions

 markov_generator (const std::vector< std::string > &items, std::size_t chain_size, std::size_t max_len)
 
std::string generate () const override
 
- Public Member Functions inherited from name_generator
std::string generate (const std::map< std::string, std::string > &variables) const
 
 name_generator ()
 
virtual ~name_generator ()
 

Private Attributes

markov_prefix_map prefixes_
 
std::size_t chain_size_
 
std::size_t max_len_
 

Detailed Description

Definition at line 24 of file markov_generator.hpp.

Constructor & Destructor Documentation

◆ markov_generator()

markov_generator::markov_generator ( const std::vector< std::string > &  items,
std::size_t  chain_size,
std::size_t  max_len 
)

Definition at line 127 of file markov_generator.cpp.

Member Function Documentation

◆ generate()

std::string markov_generator::generate ( ) const
overridevirtual

Reimplemented from name_generator.

Definition at line 134 of file markov_generator.cpp.

References chain_size_, markov_generate_name(), max_len_, and prefixes_.

Member Data Documentation

◆ chain_size_

std::size_t markov_generator::chain_size_
private

Definition at line 26 of file markov_generator.hpp.

Referenced by generate().

◆ max_len_

std::size_t markov_generator::max_len_
private

Definition at line 26 of file markov_generator.hpp.

Referenced by generate().

◆ prefixes_

markov_prefix_map markov_generator::prefixes_
private

Definition at line 25 of file markov_generator.hpp.

Referenced by generate().


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