Subversion Repositories DIN Is Noise

Rev

Rev 2009 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1528 jag 1
/*
2
* console_iterator.h
2097 jag 3
* DIN Is Noise is copyright (c) 2006-2024 Jagannathan Sampath
1713 jag 4
* DIN Is Noise is released under GNU Public License 2.0
1528 jag 5
* For more information, please visit https://dinisnoise.org/
6
*/
7
 
8
#ifndef __console_iterator
9
#define __console_iterator
10
 
11
#include <console.h>
12
#include <string>
13
 
14
struct console_iterator {
15
 
16
  console& con;
17
  char delim;
18
 
19
  console_iterator (console& c, char delim = ' ');
20
 
21
  console_iterator& operator* ();
22
  console_iterator& operator++ ();
23
  console_iterator& operator++ (int);
24
 
25
  template <typename T> console_iterator& operator= (const T& t) {
26
    con << t;
27
    return *this;
28
  }
29
 
30
};
31
 
32
#endif
33
 
34
 
35