/* * Input.h * */ #ifndef PROCESSOR_INPUT_H_ #define PROCESSOR_INPUT_H_ #include using namespace std; #include "Math/Share.h" #include "Processor/Buffer.h" #include "Tools/time-func.h" class ArithmeticProcessor; template class InputBase { protected: Buffer buffer; Timer timer; public: int values_input; static void input(SubProcessor& Proc, const vector& args); InputBase(ArithmeticProcessor& proc); ~InputBase(); }; template class Input : public InputBase> { SubProcessor>& proc; MAC_Check& MC; vector< vector< Share > > shares; octetStream o; void adjust_mac(Share& share, T& value); public: Input(SubProcessor>& proc, MAC_Check& mc); void reset(int player); void add_mine(const T& input); void add_other(int player); void send_mine(); void start(int player, int n_inputs); void stop(int player, const vector& targets); }; #endif /* PROCESSOR_INPUT_H_ */