Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (19 sloc) 499 Bytes
#include <iostream>
#include "translation_mode.h"
using namespace std;
void TranslationMode::set_mode(const ios::openmode openmode) {
mode = (openmode == ios::in) ? code : decode;
};
void TranslationMode::set_mode(const char * option) {
if (option == code_option) {
mode = code;
source = ios::in;
destination = ios::binary;
}
else if (option == decode_option) {
mode = decode;
source = ios::binary;
destination = ios::out;
}
else {} // TODO! będzie lipa...
};