14 #ifndef ECL_CONCEPTS_DEVICES_HPP_    15 #define ECL_CONCEPTS_DEVICES_HPP_    38 template <
typename Implementation>
    39 class InputCharDeviceConcept {
    75 template <
typename Implementation>
    76 class OutputCharDeviceConcept {
    90                 char write_buffer[] = { 
'd', 
'u', 
'd', 
'e', 
'\n' };
    92                 result = output_char_device.open();
    93                 no_written = output_char_device.write(
'\n');
    94                 no_written = output_char_device.write(write_buffer,5);
    95                 output_char_device.flush();
   103         Implementation output_char_device;
   115 template <
typename Implementation>
   116 class InputOutputCharDeviceConcept {
   132                 char read_buffer[10];
   134                 no_read = input_output_char_device.read(c);
   135                 no_read = input_output_char_device.read(read_buffer,10);
   137                 char write_buffer[] = { 
'd', 
'u', 
'd', 
'e', 
'\n' };
   138                 no_written = input_output_char_device.write(
'\n');
   139                 no_written = input_output_char_device.write(write_buffer,5);
   140                 input_output_char_device.flush();
   145         Implementation input_output_char_device;
   158 template <
typename Implementation>
   159 class InputByteDeviceConcept {
   173                 signed char sbuffer[10];
   177                 unsigned char usbuffer[10];
   180                 result = input_byte_device.isOpen();
   181                 no_read = input_byte_device.read(sc);
   182                 no_read = input_byte_device.read(sbuffer,10);
   183                 no_read = input_byte_device.read(c);
   184                 no_read = input_byte_device.read(buffer,10);
   185                 no_read = input_byte_device.read(usc);
   186                 no_read = input_byte_device.read(usbuffer,10);
   192         Implementation input_byte_device;
   204 template <
typename Implementation>
   205 class OutputByteDeviceConcept {
   221                 signed char sc = 
'\n';
   223                 unsigned char usc = 0x01;
   224                 signed char s_write_buffer[] = { 
'd', 
'u', 
'd', 
'e', 
'\n' };
   225                 char write_buffer[] = { 
'd', 
'u', 
'd', 
'e', 
'\n' };
   226                 unsigned char us_write_buffer[] = { 0x01, 0x02, 0x03, 0x04, 0x05 };
   228                 result = output_byte_device.isOpen();
   229                 no_written = output_byte_device.write(sc);
   230                 no_written = output_byte_device.write(c);
   231                 no_written = output_byte_device.write(usc);
   232                 no_written = output_byte_device.write(s_write_buffer,5);
   233                 no_written = output_byte_device.write(write_buffer,5);
   234                 no_written = output_byte_device.write(us_write_buffer,5);
   235                 output_byte_device.flush();
   241         Implementation output_byte_device;
   254 template <
typename Implementation>
   255 class InputOutputByteDeviceConcept {
   273                 signed char sbuffer[10];
   277                 unsigned char usbuffer[10];
   280                 result = input_output_byte_device.isOpen();
   281                 no_read = input_output_byte_device.read(sc);
   282                 no_read = input_output_byte_device.read(sbuffer,10);
   283                 no_read = input_output_byte_device.read(c);
   284                 no_read = input_output_byte_device.read(buffer,10);
   285                 no_read = input_output_byte_device.read(usc);
   286                 no_read = input_output_byte_device.read(usbuffer,10);
   292                 signed char s_write_buffer[] = { 
'd', 
'u', 
'd', 
'e', 
'\n' };
   293                 char write_buffer[] = { 
'd', 
'u', 
'd', 
'e', 
'\n' };
   294                 unsigned char us_write_buffer[] = { 0x01, 0x02, 0x03, 0x04, 0x05 };
   295                 no_written = input_output_byte_device.write(sc);
   296                 no_written = input_output_byte_device.write(c);
   297                 no_written = input_output_byte_device.write(usc);
   298                 no_written = input_output_byte_device.write(s_write_buffer,5);
   299                 no_written = input_output_byte_device.write(write_buffer,5);
   300                 no_written = input_output_byte_device.write(us_write_buffer,5);
   301                 input_output_byte_device.flush();
   306         Implementation input_output_byte_device;