Class Input

Class Documentation

class Input

Class to store input information.

Public Functions

Input()

Default constructor for the Input class.

Initialize the Input object with default values:

input_file = "";
problem_name = "LILI";
input_type = InputType::None;

Input(const char *in_file)

Constructor for Input class for a given input file.

Initialize the Input object with the given input file:

input_file = in_file;
problem_name = "LILI";
input_type = InputType::None;

Parameters:

in_file[in] Input file

Input(const Input &input)

Copy constructor for the Input class.

Parameters:

input – Other Input object

inline Input(Input &&input) noexcept

Move constructor for the Input class.

Parameters:

input – Pointer to the other Input object

~Input() = default
inline Input &operator=(Input other)
void Parse()

Parse input file in the object and store the data.

This function will parse the input file based on the filename stored in the object. The parsed data will be stored in the object.

The input file should be in JSON format.

inline void Print(lili::output::LiliCout &lout)

Print the input information.

Parameters:

lout – Custom LiliCout class for output

Friends

friend void swap(Input &first, Input &second)

Function to swap the data between two Input objects.

This function will swap the data between two Input objects in-place using std::swap.

Parameters:
  • first – First Input object

  • second – Second Input object