Doxygen
Loading...
Searching...
No Matches
outputgen.cpp
Go to the documentation of this file.
1/******************************************************************************
2 *
3 *
4 *
5 * Copyright (C) 1997-2015 by Dimitri van Heesch.
6 *
7 * Permission to use, copy, modify, and distribute this software and its
8 * documentation under the terms of the GNU General Public License is hereby
9 * granted. No representations are made about the suitability of this software
10 * for any purpose. It is provided "as is" without express or implied warranty.
11 * See the GNU General Public License for more details.
12 *
13 * Documents produced by Doxygen are derivative works derived from the
14 * input used in their production; they are not affected by this license.
15 *
16 */
17
18#include <stdexcept>
19
20#include <stdlib.h>
21
22#include "doxygen.h"
23#include "outputgen.h"
24#include "message.h"
25#include "portable.h"
26
28{
29 //printf("OutputGenerator::OutputGenerator()\n");
30}
31
33{
34 //printf("startPlainFile(%s)\n",qPrint(name));
35 m_fileName=m_dir+"/"+name;
36 m_file = Portable::fopen(m_fileName.data(),"wb");
37 if (m_file==nullptr)
38 {
39 term("Could not open file %s for writing\n",qPrint(m_fileName));
40 }
41 m_t.setFile(m_file);
42}
43
45{
46 m_t.flush();
47 m_t.setStream(nullptr);
49 m_fileName.clear();
50}
51
53{
54 return m_dir;
55}
56
61
QCString dir() const
Definition outputgen.cpp:52
void startPlainFile(const QCString &name)
Definition outputgen.cpp:32
QCString m_dir
Definition outputgen.h:117
void endPlainFile()
Definition outputgen.cpp:44
TextStream m_t
Definition outputgen.h:116
QCString fileName() const
Definition outputgen.cpp:57
QCString m_fileName
Definition outputgen.h:119
This is an alternative implementation of QCString.
Definition qcstring.h:101
#define term(fmt,...)
Definition message.h:94
FILE * fopen(const QCString &fileName, const QCString &mode)
Definition portable.cpp:366
int fclose(FILE *f)
Definition portable.cpp:386
Portable versions of functions that are platform dependent.
const char * qPrint(const char *s)
Definition qcstring.h:661