rllib  1
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
const char * text(int column)
rlSpreadsheetRow * nextRow
Definition: rlspreadsheet.h:62
const char * text(int column, int row)
void setText(int column, const char *text)
int read(const char *filename)
void setText(int column, int row, const char *text)
int printf(const char *format,...)
rlSpreadsheetCell * getFirstCell()
int write(const char *filename)
rlSpreadsheetRow()
column = 1...N
rlSpreadsheetCell * nextCell
Definition: rlspreadsheet.h:38
rlSpreadsheetRow * firstRow
Definition: rlspreadsheet.h:88
virtual ~rlSpreadsheetCell()
const char * text()
rlSpreadsheetRow * getNextRow()
const char * text(int column, int row, int page)
int exists(int column, int row, int page)
void setDelimitor(char delimitor)
int printf(int column, int row, const char *format,...)
void setNextCell(rlSpreadsheetCell *next)
rlSpreadsheetCell * firstCell
Definition: rlspreadsheet.h:61
rlSpreadsheetCell * getNextCell()
rlSpreadsheetTable * getFirstTable()
void setDelimitor(char delimitor)
int read(const char *filename)
rlSpreadsheetTable * nextTable
Definition: rlspreadsheet.h:89
void setText(const char *text)
void setNextTable(rlSpreadsheetTable *next)
void setNextRow(rlSpreadsheetRow *next)
int printf(int column, const char *format,...)
rlSpreadsheetTable * getNextTable()
rlSpreadsheetWorkbook(char delimitor='\t')
column = 1...N, row = 1...N, page = 1...N
rlSpreadsheetTable(char delimitor='\t')
column = 1...N, row = 1...N
virtual ~rlSpreadsheetTable()
void setText(int column, int row, int page, const char *text)
int write(const char *filename)
rlSpreadsheetRow * getFirstRow()
rlSpreadsheetCell(const char *text=0)
int exists(int column)
void readRow(const unsigned char *line, char delimitor='\t')
int printf(int column, int row, int page, const char *format,...)
rlSpreadsheetTable * firstTable
virtual ~rlSpreadsheetRow()
int exists(int column, int row)
void writeRow(void *fp, char delimitor='\t')
virtual ~rlSpreadsheetWorkbook()