rllib  1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
rlspreadsheet.h
Go to the documentation of this file.
1 /***************************************************************************
2  rlspreadsheet.h - description
3  -------------------
4  begin : Tue Jan 02 2001
5  copyright : (C) 2001 by R. Lehrig
6  email : lehrig@t-online.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as *
13  * published by the Free Software Foundation *
14  * *
15  ***************************************************************************/
16 #ifndef _RL_SPREADSHEET_H_
17 #define _RL_SPREADSHEET_H_
18 
19 #include "rldefine.h"
20 
25 {
26 public:
27  rlSpreadsheetCell(const char *text=0);
28  virtual ~rlSpreadsheetCell();
29  const char *text();
30  void setText(const char *text);
31  int printf(const char *format, ...);
32  void clear();
33  void setNextCell(rlSpreadsheetCell *next);
35  int exists();
36 private:
37  char *txt;
39 };
40 
45 {
46 public:
49  virtual ~rlSpreadsheetRow();
50  const char *text(int column);
51  void setText(int column, const char *text);
52  int printf(int column, const char *format, ...);
53  void clear();
54  void setNextRow(rlSpreadsheetRow *next);
57  void readRow(const unsigned char *line, char delimitor='\t');
58  void writeRow(void *fp, char delimitor='\t');
59  int exists(int column);
60 private:
63 };
64 
70 {
71 public:
73  rlSpreadsheetTable(char delimitor='\t');
74  virtual ~rlSpreadsheetTable();
75  const char *text(int column, int row);
76  void setText(int column, int row, const char *text);
77  int printf(int column, int row, const char *format, ...);
78  void clear();
79  int read(const char *filename);
80  int write(const char *filename);
81  void setNextTable(rlSpreadsheetTable *next);
84  int exists(int column, int row);
85  void setDelimitor(char delimitor);
86 private:
87  char delimitor;
90 };
91 
97 {
98 public:
100  rlSpreadsheetWorkbook(char delimitor='\t');
101  virtual ~rlSpreadsheetWorkbook();
102  const char *text(int column, int row, int page);
103  void setText(int column, int row, int page, const char *text);
104  int printf(int column, int row, int page, const char *format, ...);
105  void clear();
106  int read(const char *filename);
107  int write(const char *filename);
108  int exists(int column, int row, int page);
110  void setDelimitor(char delimitor);
111 private:
112  char delimitor;
114 };
115 
116 #endif