UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Attributes | List of all members
LineInput Class Reference

#include <LineInput.H>

Public Member Functions

 LineInput (FILE *fp)
 
int read_line ()
 
char & operator[] (int i)
 
 operator char * ()
 
int len ()
 
void strip (int i)
 
void unstrip (int i)
 
void undo_strips ()
 
char * word (int i)
 
int word_len (int i)
 
int word_cmp (int i, const char *s)
 
int skip (const char *set)
 

Protected Attributes

FILE * file
 
CharAr buf
 
int strip_base
 

Detailed Description

Line input abstraction with logical line ('\' as glue char between real lines.

Constructor & Destructor Documentation

LineInput::LineInput ( FILE *  fp)

Attach input stream

Member Function Documentation

int LineInput::len ( )
inline

Return length of line

LineInput::operator char * ( )
inline

Access to the whole line

char& LineInput::operator[] ( int  i)
inline

Access to the line contents char by char

int LineInput::read_line ( )

Read full logical line into internal buffer; returns !0 if can not due to EOF.

int LineInput::skip ( const char *  set)

Skip pointed characters and return the first non-pointed char

void LineInput::strip ( int  i)
inline

Strip line from the left end until i char; i become 0

void LineInput::undo_strips ( )
inline

Undo all strips

void LineInput::unstrip ( int  i)
inline

Unstrip line by i

char* LineInput::word ( int  i)

Access to the line contents per word (space separated)

int LineInput::word_cmp ( int  i,
const char *  s 
)

Compare pointed word with string; -1 means word is less than s

int LineInput::word_len ( int  i)

Return length if pointed word


The documentation for this class was generated from the following file: