#pragma once
#include "../function_call/functioncall.h"

typedef struct{
    FunctionCall* functionDo;
    FunctionCall* functionUndo;
} Operation;

/*
    Constructor for the Operation
    Input: functionDo - FunctionCall* - the function to be called when the operation is done
           functionUndo - FunctionCall* - the function to be called when the operation is undone
    Output: a pointer to the newly created Operation
*/
Operation* _Operation_Constructor(FunctionCall* functionDo, FunctionCall* functionUndo);

/*
    Destructor for the Operation
    Input: operation - Operation*
    Output: -
*/
void _Operation_Destructor(Operation* operation);

/*
    Executes the Do function
    Input: operation - Operation*
    Output: -
*/
void _Operation_Do(Operation* operation);

/*
    Executes the Undo function
    Input: operation - Operation*
    Output: -
*/
void _Operation_Undo(Operation* operation);