rllib  1
rlreport.h
Go to the documentation of this file.
1 /***************************************************************************
2  rlreport.h - description
3  -------------------
4  begin : Sun Jul 03 2011
5  copyright : (C) 2011 pvbrowser
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_REPORT_H_
17 #define _RL_REPORT_H_
18 
19 #include <stdio.h>
20 #include "rldefine.h"
21 #include "rlinifile.h"
22 #include "rlstring.h"
23 
37 
40 
51 
64 class rlReport
65 {
66 public:
67 
68  rlReport();
69  virtual ~rlReport();
70 
74  int open(const char *filename);
75 
79  int close();
80 
84  int printf(const char *format, ...);
85 
89  int beginDocument();
90 
94  int endDocument();
95 
101  int include(const char *filename, rlIniFile *ini=NULL);
102 
115  int includeHeader(const char *documentclass = "\\documentclass[a4paper]{article}",
116  const char *language = "\\usepackage[english]{babel}",
117  const char *inputenc = "\\usepackage[utf8]{inputenc}",
118  const char *layout = "\\setlength{\\parindent}{0pt} \\setlength{\\topmargin}{-50pt} \\setlength{\\oddsidemargin}{0pt} \\setlength{\\textwidth}{480pt} \\setlength{\\textheight}{700pt}");
119 
126  int includeCSV(const char *filename, int use_first_row_as_title=1, const char *legend=NULL, char delimitor='\t');
127 
133  int includeImage(const char *filename, const char *legend=NULL, float scale=1.0f);
134 
142  int spawn(const char *command);
147  int pdflatex(const char *command = NULL);
148 
149 private:
150  FILE *fout; // output file pointer
151  rlString file; // name of the output file
152 };
153 
154 #endif
155 
int printf(const char *format,...)
Definition: rlreport.cpp:53
rlReport()
Definition: rlreport.cpp:21
int beginDocument()
Definition: rlreport.cpp:67
FILE * fout
Definition: rlreport.h:150
int endDocument()
Definition: rlreport.cpp:72
int includeHeader(const char *documentclass="\ocumentclass[a4paper]{article}", const char *language="\sepackage[english]{babel}", const char *inputenc="\sepackage[utf8]{inputenc}", const char *layout="\etlength{\arindent}{0pt} \etlength{\opmargin}{-50pt} \etlength{\ddsidemargin}{0pt} \etlength{\extwidth}{480pt} \etlength{\extheight}{700pt}")
Definition: rlreport.cpp:157
int spawn(const char *command)
Definition: rlreport.cpp:296
virtual ~rlReport()
Definition: rlreport.cpp:26
int open(const char *filename)
Definition: rlreport.cpp:31
rlString file
Definition: rlreport.h:151
int includeImage(const char *filename, const char *legend=NULL, float scale=1.0f)
Definition: rlreport.cpp:287
int include(const char *filename, rlIniFile *ini=NULL)
Definition: rlreport.cpp:77
int pdflatex(const char *command=NULL)
Definition: rlreport.cpp:308
int includeCSV(const char *filename, int use_first_row_as_title=1, const char *legend=NULL, char delimitor='\t')
Definition: rlreport.cpp:241
int close()
Definition: rlreport.cpp:45