UNIVERS
15.3
UNIVERS base processing software API
Main Page
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
csi
LineInput.H
1
/* LineInput.H */
2
/* $Id: LineInput.H,v 1.3 2009/04/14 12:06:50 vlad Exp $ */
3
#ifndef __LineInput_H
4
#define __LineInput_H
5
6
#include <stdio.h>
7
8
#include <csi/CharAr.H>
9
10
16
class
LineInput
17
{
18
protected
:
19
20
FILE *file;
21
CharAr buf;
22
int
strip_base;
23
24
public
:
25
27
LineInput
(FILE* fp);
28
31
int
read_line
();
32
34
char
&
operator[]
(
int
i)
35
{
return
buf.operator[](strip_base + i); }
36
38
operator
char
* ()
39
{
return
&buf.operator[](strip_base); }
40
42
int
len
()
43
{
return
buf.count() - strip_base - 1; }
44
46
void
strip
(
int
i)
47
{ strip_base += i; }
48
50
void
unstrip
(
int
i)
51
{ strip_base -= i;
52
if
(strip_base < 0) strip_base = 0; }
53
55
void
undo_strips
()
56
{ strip_base = 0; }
57
59
char
*
word
(
int
i);
60
62
int
word_len
(
int
i);
63
65
int
word_cmp
(
int
i,
const
char
* s);
66
68
int
skip
(
const
char
* set);
69
70
};
71
72
73
#endif
/* LineInput.H */
LineInput::skip
int skip(const char *set)
LineInput::undo_strips
void undo_strips()
Definition:
LineInput.H:55
LineInput
Definition:
LineInput.H:16
LineInput::LineInput
LineInput(FILE *fp)
LineInput::strip
void strip(int i)
Definition:
LineInput.H:46
LineInput::word_cmp
int word_cmp(int i, const char *s)
LineInput::word
char * word(int i)
LineInput::operator[]
char & operator[](int i)
Definition:
LineInput.H:34
LineInput::len
int len()
Definition:
LineInput.H:42
LineInput::word_len
int word_len(int i)
LineInput::unstrip
void unstrip(int i)
Definition:
LineInput.H:50
LineInput::read_line
int read_line()
Generated by
1.8.5