rllib  1
rlhistorylogger.h
Go to the documentation of this file.
1 /***************************************************************************
2  rlhistorylogger.h - description
3  -------------------
4  begin : Wed Dec 06 2006
5  copyright : (C) 2006 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_HISTORY_LOGGER_H_
17 #define _RL_HISTORY_LOGGER_H_
18 
19 #include "rldefine.h"
20 #include "rltime.h"
21 #include "rlthread.h"
22 #include <stdio.h>
23 
24 typedef struct _rlHistoryLogLine_
25 {
27  char *line;
29 
36 {
37 public:
38  rlHistoryLogger(const char *csvName, int maxHoursPerFile, int maxLinesInMemory=100);
39  virtual ~rlHistoryLogger();
40  int pushLine(const char *text);
41  const char *firstLine();
42  const char *nextLine();
44  int debug;
45 private:
46  int pushLineToMemory(const char *line);
47  int pushLineToFile(const char *line);
48  int openFile();
51  FILE *fout;
54 };
55 #endif
_rlHistoryLogLine_ * next
const char * firstLine()
virtual ~rlHistoryLogger()
rlHistoryLogLine * current_line
rlHistoryLogLine * first_line
int pushLineToMemory(const char *line)
int pushLine(const char *text)
rlHistoryLogger(const char *csvName, int maxHoursPerFile, int maxLinesInMemory=100)
struct _rlHistoryLogLine_ rlHistoryLogLine
int pushLineToFile(const char *line)
Definition: rltime.h:25
const char * nextLine()