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::machine Class Reference

#include <chomik.h>

Inheritance diagram for chomik::machine:
Collaboration diagram for chomik::machine:

Public Member Functions

int get_amount_of_variables_in_the_memory () const
 
int get_amount_of_items_in_the_memory_variables_signature (int i) const
 
std::string get_signature_item_representation (int var_index, int item_index) const
 
std::string get_signature_item_type_name (int var_index, int item_index) const
 
virtual bool get_can_create_files () const
 
int get_max_enum_type_index (const std::string &tn) const
 
std::string get_enum_type_item (const std::string &tn, int i) const
 
const std::vector< std::unique_ptr< assignment_event > > & get_vector_of_assignment_events () const
 
void add_signature_regular_expression (std::unique_ptr< signature_regular_expression > &&e)
 
void add_stream (std::unique_ptr< generic_stream > &&s)
 
void add_assignment_event (std::unique_ptr< assignment_event > &&e)
 
void add_type_definition_statement (std::shared_ptr< const statement > &&s)
 
void add_variable_definition_statement (std::shared_ptr< const statement > &&s)
 
bool get_type_instance_is_known (const std::string &type_name) const
 
type_instanceget_type_instance (const std::string &type_name) const
 
void get_first_and_last_iterators_for_enum_type (const std::string &type_name, std::vector< std::unique_ptr< type_instance_enum_value > >::const_iterator &f, std::vector< std::unique_ptr< type_instance_enum_value > >::const_iterator &l) const
 
void get_first_and_last_iterators_for_range_type (const std::string &type_name, int &f, int &l) const
 
void get_first_and_last_iterators_for_ad_hoc_range_type (const std::string &type_name, int &f, int &l) const
 
void add_type_instance (std::shared_ptr< type_instance > &&i)
 
void create_auxilliary_variables_for_type_instance (type_instance &ti)
 
void add_variable_with_value (std::shared_ptr< variable_with_value > &&vv)
 
void expand (int i)
 
void report (std::ostream &s) const
 
bool get_variable_is_represented_in_memory (const signature &vn) const
 
const variable_with_valueget_variable_with_value (const signature &vn) const
 
variable_with_valueget_variable_with_value (const signature &vn)
 
variable_with_valueget_variable_with_value_by_index (int index)
 
variable_with_value::actual_memory_representation_type get_actual_memory_representation_type_of_the_variable (const signature &vn) const
 
std::string get_actual_text_representation_of_a_variable (const signature &vn) const
 
std::string get_variable_value_enum (const signature &vn) const
 
std::string get_variable_value_string (const signature &vn) const
 
int get_variable_value_integer (const signature &vn) const
 
double get_variable_value_float (const signature &vn) const
 
void get_variable_value_code (const signature &vn, code &target) const
 
virtual void create_predefined_variables ()
 
virtual void create_predefined_streams ()
 
virtual void create_predefined_types ()
 
virtual bool get_is_user_defined_executable (const signature &s) const
 
virtual void execute_user_defined_executable (const signature &s)
 
int get_last_created_stream_index () const
 
int get_last_created_signature_regular_expression_index () const
 
int get_amount_of_streams () const
 
int get_amount_of_signature_regular_expressions () const
 
generic_streamget_stream (int i)
 
signature_regular_expressionget_signature_regular_expression (int i)
 
type_instancecreate_an_ad_hoc_type (const generic_type &t, generator &g, const std::string &tn)
 
void add_ad_hoc_type (std::shared_ptr< type_instance_ad_hoc_range > &&t)
 
void destroy_ad_hoc_type_instances_above (int amount)
 
int get_amount_of_ad_hoc_type_instances () const
 

Static Public Attributes

static std::ostream * current_compilation_error_stream
 
static std::ostream * current_runtime_warning_stream
 

Protected Attributes

std::vector< std::shared_ptr< const statement > > vector_of_type_definiton_statements
 
std::vector< std::shared_ptr< const statement > > vector_of_variable_definition_statements
 
std::vector< std::shared_ptr< type_instance > > vector_of_type_instances
 
std::vector< std::shared_ptr< type_instance > > vector_of_ad_hoc_type_instances
 
std::map< std::string, std::shared_ptr< type_instance > > map_type_name_to_type_instance
 
std::vector< std::shared_ptr< family_of_variables > > vector_of_variable_families
 
std::vector< std::unique_ptr< assignment_event > > vector_of_assignment_events
 
std::vector< std::shared_ptr< variable_with_value > > memory
 
std::map< std::string, std::shared_ptr< variable_with_value > > map_signature_string_representation_to_variable_with_value
 
std::vector< std::unique_ptr< generic_stream > > vector_of_streams
 
std::vector< std::unique_ptr< signature_regular_expression > > vector_of_signature_regular_expressions
 

Friends

class signature_common_data
 
class signature
 

Detailed Description

This class represents the memory used by the program while executing it.

Member Function Documentation

◆ add_ad_hoc_type()

void chomik::machine::add_ad_hoc_type ( std::shared_ptr< type_instance_ad_hoc_range > && t)

◆ add_assignment_event()

void chomik::machine::add_assignment_event ( std::unique_ptr< assignment_event > && e)
inline

◆ add_signature_regular_expression()

void chomik::machine::add_signature_regular_expression ( std::unique_ptr< signature_regular_expression > && e)
inline

◆ add_stream()

void chomik::machine::add_stream ( std::unique_ptr< generic_stream > && s)
inline

◆ add_type_definition_statement()

void chomik::machine::add_type_definition_statement ( std::shared_ptr< const statement > && s)
inline

◆ add_type_instance()

void chomik::machine::add_type_instance ( std::shared_ptr< type_instance > && i)
inline

◆ add_variable_definition_statement()

void chomik::machine::add_variable_definition_statement ( std::shared_ptr< const statement > && s)
inline

◆ add_variable_with_value()

void chomik::machine::add_variable_with_value ( std::shared_ptr< variable_with_value > && vv)

◆ create_an_ad_hoc_type()

type_instance * chomik::machine::create_an_ad_hoc_type ( const generic_type & t,
generator & g,
const std::string & tn )

◆ create_auxilliary_variables_for_type_instance()

void chomik::machine::create_auxilliary_variables_for_type_instance ( type_instance & ti)

For each newly created type instance some special variables of that type are created.

◆ create_predefined_streams()

virtual void chomik::machine::create_predefined_streams ( )
virtual

Reimplemented in http_chomik::machine.

◆ create_predefined_types()

virtual void chomik::machine::create_predefined_types ( )
virtual

◆ create_predefined_variables()

virtual void chomik::machine::create_predefined_variables ( )
virtual

Reimplemented in sdl_chomik::machine.

◆ destroy_ad_hoc_type_instances_above()

void chomik::machine::destroy_ad_hoc_type_instances_above ( int amount)

◆ execute_user_defined_executable()

virtual void chomik::machine::execute_user_defined_executable ( const signature & s)
inlinevirtual

Reimplemented in sdl_chomik::machine.

◆ expand()

void chomik::machine::expand ( int i)

◆ get_actual_memory_representation_type_of_the_variable()

variable_with_value::actual_memory_representation_type chomik::machine::get_actual_memory_representation_type_of_the_variable ( const signature & vn) const

◆ get_actual_text_representation_of_a_variable()

std::string chomik::machine::get_actual_text_representation_of_a_variable ( const signature & vn) const

◆ get_amount_of_ad_hoc_type_instances()

int chomik::machine::get_amount_of_ad_hoc_type_instances ( ) const
inline

◆ get_amount_of_items_in_the_memory_variables_signature()

int chomik::machine::get_amount_of_items_in_the_memory_variables_signature ( int i) const
inline

◆ get_amount_of_signature_regular_expressions()

int chomik::machine::get_amount_of_signature_regular_expressions ( ) const
inline

◆ get_amount_of_streams()

int chomik::machine::get_amount_of_streams ( ) const
inline

◆ get_amount_of_variables_in_the_memory()

int chomik::machine::get_amount_of_variables_in_the_memory ( ) const
inline

◆ get_can_create_files()

virtual bool chomik::machine::get_can_create_files ( ) const
inlinevirtual

Reimplemented in http_chomik::machine.

◆ get_enum_type_item()

std::string chomik::machine::get_enum_type_item ( const std::string & tn,
int i ) const

◆ get_first_and_last_iterators_for_ad_hoc_range_type()

void chomik::machine::get_first_and_last_iterators_for_ad_hoc_range_type ( const std::string & type_name,
int & f,
int & l ) const

◆ get_first_and_last_iterators_for_enum_type()

void chomik::machine::get_first_and_last_iterators_for_enum_type ( const std::string & type_name,
std::vector< std::unique_ptr< type_instance_enum_value > >::const_iterator & f,
std::vector< std::unique_ptr< type_instance_enum_value > >::const_iterator & l ) const
inline

◆ get_first_and_last_iterators_for_range_type()

void chomik::machine::get_first_and_last_iterators_for_range_type ( const std::string & type_name,
int & f,
int & l ) const
inline

◆ get_is_user_defined_executable()

virtual bool chomik::machine::get_is_user_defined_executable ( const signature & s) const
inlinevirtual

Reimplemented in sdl_chomik::machine.

◆ get_last_created_signature_regular_expression_index()

int chomik::machine::get_last_created_signature_regular_expression_index ( ) const
inline

◆ get_last_created_stream_index()

int chomik::machine::get_last_created_stream_index ( ) const
inline

◆ get_max_enum_type_index()

int chomik::machine::get_max_enum_type_index ( const std::string & tn) const

◆ get_signature_item_representation()

std::string chomik::machine::get_signature_item_representation ( int var_index,
int item_index ) const

◆ get_signature_item_type_name()

std::string chomik::machine::get_signature_item_type_name ( int var_index,
int item_index ) const

◆ get_signature_regular_expression()

signature_regular_expression & chomik::machine::get_signature_regular_expression ( int i)
inline

◆ get_stream()

generic_stream & chomik::machine::get_stream ( int i)
inline

◆ get_type_instance()

type_instance & chomik::machine::get_type_instance ( const std::string & type_name) const
inline

◆ get_type_instance_is_known()

bool chomik::machine::get_type_instance_is_known ( const std::string & type_name) const
inline

◆ get_variable_is_represented_in_memory()

bool chomik::machine::get_variable_is_represented_in_memory ( const signature & vn) const

◆ get_variable_value_code()

void chomik::machine::get_variable_value_code ( const signature & vn,
code & target ) const

◆ get_variable_value_enum()

std::string chomik::machine::get_variable_value_enum ( const signature & vn) const

◆ get_variable_value_float()

double chomik::machine::get_variable_value_float ( const signature & vn) const

◆ get_variable_value_integer()

int chomik::machine::get_variable_value_integer ( const signature & vn) const

◆ get_variable_value_string()

std::string chomik::machine::get_variable_value_string ( const signature & vn) const

◆ get_variable_with_value() [1/2]

variable_with_value & chomik::machine::get_variable_with_value ( const signature & vn)

◆ get_variable_with_value() [2/2]

const variable_with_value & chomik::machine::get_variable_with_value ( const signature & vn) const

◆ get_variable_with_value_by_index()

variable_with_value & chomik::machine::get_variable_with_value_by_index ( int index)

◆ get_vector_of_assignment_events()

const std::vector< std::unique_ptr< assignment_event > > & chomik::machine::get_vector_of_assignment_events ( ) const
inline

◆ report()

void chomik::machine::report ( std::ostream & s) const

Friends And Related Symbol Documentation

◆ signature

friend class signature
friend

◆ signature_common_data

friend class signature_common_data
friend

Member Data Documentation

◆ current_compilation_error_stream

std::ostream* chomik::machine::current_compilation_error_stream
static

◆ current_runtime_warning_stream

std::ostream * chomik::machine::current_runtime_warning_stream
static

◆ map_signature_string_representation_to_variable_with_value

std::map<std::string, std::shared_ptr<variable_with_value> > chomik::machine::map_signature_string_representation_to_variable_with_value
protected

◆ map_type_name_to_type_instance

std::map<std::string, std::shared_ptr<type_instance> > chomik::machine::map_type_name_to_type_instance
protected

◆ memory

std::vector<std::shared_ptr<variable_with_value> > chomik::machine::memory
protected

◆ vector_of_ad_hoc_type_instances

std::vector<std::shared_ptr<type_instance> > chomik::machine::vector_of_ad_hoc_type_instances
protected

◆ vector_of_assignment_events

std::vector<std::unique_ptr<assignment_event> > chomik::machine::vector_of_assignment_events
protected

◆ vector_of_signature_regular_expressions

std::vector<std::unique_ptr<signature_regular_expression> > chomik::machine::vector_of_signature_regular_expressions
protected

◆ vector_of_streams

std::vector<std::unique_ptr<generic_stream> > chomik::machine::vector_of_streams
protected

◆ vector_of_type_definiton_statements

std::vector<std::shared_ptr<const statement> > chomik::machine::vector_of_type_definiton_statements
protected

◆ vector_of_type_instances

std::vector<std::shared_ptr<type_instance> > chomik::machine::vector_of_type_instances
protected

◆ vector_of_variable_definition_statements

std::vector<std::shared_ptr<const statement> > chomik::machine::vector_of_variable_definition_statements
protected

◆ vector_of_variable_families

std::vector<std::shared_ptr<family_of_variables> > chomik::machine::vector_of_variable_families
protected

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

copyright by Pawel Biernacki

Vantaa 2022