listepara.h
1/* A PARA IS A TITLE, A SET OF WORDS OR A LIST. TO KNOW ITS TYPE,
2 * YOU MUST LOOK AT IN THE LAYOUT CLASS.
3 */
4/*
5** Header file for inclusion with kword_xml2latex.c
6**
7** Copyright (C) 2000 Robert JACOLIN
8**
9** This library is free software; you can redistribute it and/or
10** modify it under the terms of the GNU Library General Public
11** License as published by the Free Software Foundation; either
12** version 2 of the License, or (at your option) any later version.
13**
14** This library is distributed in the hope that it will be useful,
15** but WITHOUT ANY WARRANTY; without even the implied warranty of
16** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17** Library General Public License for more details.
18**
19** To receive a copy of the GNU Library General Public License, write to the
20** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22**
23*/
24
25#ifndef __KWORD_LISTPARA_H__
26#define __KWORD_LISTPARA_H__
27
28#include "para.h"
29
30class ListPara: public Para
31{
32 Para *_start, *_end;
33 int _size;
34
35 public:
36 ListPara();
37 virtual ~ListPara();
38
39 void initialiser(Para*);
40 void add(Para*);
41 void rem();
42
43 Para* getFirst() const { return _start; }
44 Para* getLast() const { return _end; }
45 int getSize() const { return _size; }
46
47 void vider();
48
49 private:
50};
51
52class ParaIter {
53 Para *_courant;
54
55 protected:
56
57 public:
63 ParaIter() { _courant = 0; }
65 ParaIter(ListPara &l) { _courant = l.getFirst(); }
67 ParaIter(ListPara *l) {
68 if(l != 0)
69 _courant = l->getFirst();
70 else
71 _courant = 0;
72 }
74
80 virtual ~ParaIter() { }
82
87
88 Para* getCourant() const { return _courant; }
89 bool isTerminate() const { return (_courant == 0); }
91
96 void next () { _courant = _courant->getNext(); }
97 void setList(const ListPara &l) { _courant = l.getFirst(); }
99
105};
106
107#endif /* __KWORD_LISTPARA_H__ */
This class hold a real paragraph.
Definition para.h:59