Brain  1.0.0
A fast esoteric language!
ArgsOptions Class Reference

This class handles all the options passed as arguments to Brain. It does so by using an enum of all options accepted by Brain and an integer which stores by bitwise comparation the values of options used at the moment of execution. More...

#include <ArgsOptions.h>

Public Member Functions

 ArgsOptions (ArgsOptions const &)=delete
 
ArgsOptionsoperator= (ArgsOptions const &)=delete
 
void add_option (BrainOption option)
 Add an option to be used by Brain, it does a bitwise OR on the value to add it to an integer. More...
 
bool has_option (BrainOption option)
 Verifies and returns true if an option is present (being used) at the moment of execution, otherwise it returns false. More...
 
void set_cells_size (int cells_size)
 set_cells_size Sets the size of Brain's cells. More...
 
int get_cells_size ()
 get_cells_size More...
 
BrainOption get_optimization ()
 Returns the optimization level to compile Brain files. More...
 

Static Public Member Functions

static ArgsOptionsinstance ()
 Returns the ArgsOptions instance.
 

Detailed Description

This class handles all the options passed as arguments to Brain. It does so by using an enum of all options accepted by Brain and an integer which stores by bitwise comparation the values of options used at the moment of execution.

Member Function Documentation

void ArgsOptions::add_option ( BrainOption  option)

Add an option to be used by Brain, it does a bitwise OR on the value to add it to an integer.

Parameters
optionThe option to be added in.
int ArgsOptions::get_cells_size ( )

get_cells_size

Returns
An integer corresponding with the size of the Brain cells known as the Brain memory.
BrainOption ArgsOptions::get_optimization ( )

Returns the optimization level to compile Brain files.

Returns
A BrainOption representing the level of optimization.
bool ArgsOptions::has_option ( BrainOption  option)

Verifies and returns true if an option is present (being used) at the moment of execution, otherwise it returns false.

Parameters
optionThe option to be tested against.
void ArgsOptions::set_cells_size ( int  cells_size)

set_cells_size Sets the size of Brain's cells.

Parameters
cells_sizeAn integer representing the size of the cells to be set.

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