summaryrefslogtreecommitdiffstats
path: root/mpeglib/example/yaf/yafcore/lineStack.h
blob: aea1f686513528b4467e0383bbc6e9a272a32438 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
  a class which scans a string and converts it into commandLines
  Copyright (C) 1998  Martin Vogt

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU Library General Public License as published by
  the Free Software Foundation.

  For more information look at the file COPYRIGHT in this package

 */





#ifndef __LINESTACK_H
#define __LINESTACK_H


#include "buffer.h"

/* 
   This class is a hack because I have problems with
   the io-streams. Why these stupid things cannot buffer
   a whole line?
   They behave strange, I hate them.
*/
   


class LineStack {

 public:
  LineStack();
  ~LineStack();

  void appendBottom(char* buffer);
  void appendBottom(char* buffer,int buflen);
  void appendBottom(LineStack* stack);
  
  int hasLine();
  void nextLine(Buffer* nextLine);

  void print(char* name);
 private:
  char* getReturnPos();

  Buffer* stack;
};


#endif