chomik 0.2.1
experimental and minimalistic programming language

My name is Pawel Biernacki.
I am a software engineer.
This site is my hobby project.

Loading...
Searching...
No Matches
chomik::generator Class Reference

#include <chomik.h>

Inheritance diagram for chomik::generator:
Collaboration diagram for chomik::generator:

Public Member Functions

 generator (const generic_name &gn, const std::string &filename, unsigned new_line_number)
 
 generator (const generic_range &gr, const std::string &filename, unsigned new_line_number)
 
 generator (const generic_value &gv, const std::string &filename, unsigned new_line_number)
 
 generator (const std::string &filename, unsigned new_line_number)
 
virtual void initialize_description_of_a_cartesian_product (description_of_a_cartesian_product &target) const override
 
virtual bool get_can_have_placeholders () const
 
virtual bool get_has_placeholder (const std::string &p) const override
 
virtual bool get_has_placeholder_with_value (const std::string &p) const override
 
virtual placeholder_with_valueget_placeholder_with_value (const std::string &p) override
 
virtual const placeholder_with_valueget_placeholder_with_value (const std::string &p) const override
 
virtual int get_placeholder_value_integer (const std::string &p) const override
 
virtual double get_placeholder_value_float (const std::string &p) const override
 
virtual void get_placeholder_value_code (const std::string &p, code &target) const override
 
virtual std::string get_actual_text_representation_of_a_placeholder (const std::string &placeholder) const override
 
virtual void add_placeholder (const std::string &p, std::shared_ptr< generic_type > &&t) override
 
void add_placeholder_with_value (std::shared_ptr< placeholder_with_value > &&p)
 
virtual void report (std::ostream &s) const override
 
virtual bool get_the_cartesian_product_of_placeholder_types_is_finite () const override
 
virtual bool get_the_cartesian_product_of_placeholder_types_is_small (machine &m) const override
 
virtual bool get_the_cartesian_product_of_placeholder_types_is_empty () const override
 
virtual bool get_the_cartesian_product_of_placeholder_types_has_one_item () const override
 
virtual void initialize (machine &m) override
 
virtual bool get_is_valid () override
 
virtual void increment (machine &m) override
 
virtual bool get_terminated () const override
 
bool get_does_not_exceed_level (int max_level) const
 
virtual void debug () const override
 
virtual void finalize (machine &m) override
 
- Public Member Functions inherited from chomik::basic_generator
virtual ~basic_generator ()
 
void set_father (std::shared_ptr< basic_generator > f)
 
virtual const std::string convert_childs_placeholder_name_to_father (const std::string &cpn) const
 
std::string get_placeholder_value_string (const std::string &p) const
 
std::string get_placeholder_value_enum (const std::string &p) const
 
virtual void add_mapping (const std::string &f, const std::string &s)
 
virtual void initialize_mapping (const matching_protocol &mp)
 

Additional Inherited Members

- Protected Attributes inherited from chomik::basic_generator
std::weak_ptr< basic_generatormy_father
 
- Static Protected Attributes inherited from chomik::basic_generator
static simple_placeholder_with_value_and_report< int, static_cast< int >(chomik::variable_with_value::actual_memory_representation_type::INTEGER)> dummy
 

Detailed Description

This class creates all possible tuples of a finite cartesian product of the given sets. It can be used almost as an iterator.

Constructor & Destructor Documentation

◆ generator() [1/4]

chomik::generator::generator ( const generic_name & gn,
const std::string & filename,
unsigned new_line_number )

◆ generator() [2/4]

chomik::generator::generator ( const generic_range & gr,
const std::string & filename,
unsigned new_line_number )

◆ generator() [3/4]

chomik::generator::generator ( const generic_value & gv,
const std::string & filename,
unsigned new_line_number )

◆ generator() [4/4]

chomik::generator::generator ( const std::string & filename,
unsigned new_line_number )

Member Function Documentation

◆ add_placeholder()

virtual void chomik::generator::add_placeholder ( const std::string & p,
std::shared_ptr< generic_type > && t )
overridevirtual

Reimplemented from chomik::basic_generator.

◆ add_placeholder_with_value()

void chomik::generator::add_placeholder_with_value ( std::shared_ptr< placeholder_with_value > && p)
inline

◆ debug()

virtual void chomik::generator::debug ( ) const
overridevirtual

Reimplemented from chomik::basic_generator.

◆ finalize()

virtual void chomik::generator::finalize ( machine & m)
overridevirtual

Reimplemented from chomik::basic_generator.

◆ get_actual_text_representation_of_a_placeholder()

virtual std::string chomik::generator::get_actual_text_representation_of_a_placeholder ( const std::string & placeholder) const
inlineoverridevirtual

Reimplemented from chomik::basic_generator.

◆ get_can_have_placeholders()

virtual bool chomik::generator::get_can_have_placeholders ( ) const
inlinevirtual

Reimplemented from chomik::basic_generator.

◆ get_does_not_exceed_level()

bool chomik::generator::get_does_not_exceed_level ( int max_level) const

◆ get_has_placeholder()

virtual bool chomik::generator::get_has_placeholder ( const std::string & p) const
overridevirtual

Reimplemented from chomik::basic_generator.

◆ get_has_placeholder_with_value()

virtual bool chomik::generator::get_has_placeholder_with_value ( const std::string & p) const
overridevirtual

Reimplemented from chomik::basic_generator.

◆ get_is_valid()

virtual bool chomik::generator::get_is_valid ( )
overridevirtual

Reimplemented from chomik::basic_generator.

◆ get_placeholder_value_code()

virtual void chomik::generator::get_placeholder_value_code ( const std::string & p,
code & target ) const
overridevirtual

Reimplemented from chomik::basic_generator.

◆ get_placeholder_value_float()

virtual double chomik::generator::get_placeholder_value_float ( const std::string & p) const
overridevirtual

Reimplemented from chomik::basic_generator.

◆ get_placeholder_value_integer()

virtual int chomik::generator::get_placeholder_value_integer ( const std::string & p) const
overridevirtual

Reimplemented from chomik::basic_generator.

◆ get_placeholder_with_value() [1/2]

virtual const placeholder_with_value & chomik::generator::get_placeholder_with_value ( const std::string & p) const
overridevirtual

Reimplemented from chomik::basic_generator.

◆ get_placeholder_with_value() [2/2]

virtual placeholder_with_value & chomik::generator::get_placeholder_with_value ( const std::string & p)
overridevirtual

Reimplemented from chomik::basic_generator.

◆ get_terminated()

virtual bool chomik::generator::get_terminated ( ) const
overridevirtual

Reimplemented from chomik::basic_generator.

◆ get_the_cartesian_product_of_placeholder_types_has_one_item()

virtual bool chomik::generator::get_the_cartesian_product_of_placeholder_types_has_one_item ( ) const
overridevirtual

Reimplemented from chomik::basic_generator.

◆ get_the_cartesian_product_of_placeholder_types_is_empty()

virtual bool chomik::generator::get_the_cartesian_product_of_placeholder_types_is_empty ( ) const
inlineoverridevirtual

Reimplemented from chomik::basic_generator.

◆ get_the_cartesian_product_of_placeholder_types_is_finite()

virtual bool chomik::generator::get_the_cartesian_product_of_placeholder_types_is_finite ( ) const
overridevirtual

Reimplemented from chomik::basic_generator.

◆ get_the_cartesian_product_of_placeholder_types_is_small()

virtual bool chomik::generator::get_the_cartesian_product_of_placeholder_types_is_small ( machine & m) const
overridevirtual

Reimplemented from chomik::basic_generator.

◆ increment()

virtual void chomik::generator::increment ( machine & m)
overridevirtual

◆ initialize()

virtual void chomik::generator::initialize ( machine & m)
overridevirtual

◆ initialize_description_of_a_cartesian_product()

virtual void chomik::generator::initialize_description_of_a_cartesian_product ( description_of_a_cartesian_product & target) const
overridevirtual

◆ report()

virtual void chomik::generator::report ( std::ostream & s) const
overridevirtual

Reimplemented from chomik::basic_generator.


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

copyright by Pawel Biernacki

Vantaa 2022