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
27
OutputGenerator::OutputGenerator
(
const
QCString
&
dir
) :
m_t
(nullptr),
m_dir
(
dir
)
28
{
29
//printf("OutputGenerator::OutputGenerator()\n");
30
}
31
32
void
OutputGenerator::startPlainFile
(
const
QCString
&name)
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 {} for writing\n"
,
m_fileName
);
40
}
41
m_t
.setFile(
m_file
);
42
}
43
44
void
OutputGenerator::endPlainFile
()
45
{
46
m_t
.flush();
47
m_t
.setStream(
nullptr
);
48
Portable::fclose
(
m_file
);
49
m_fileName
.clear();
50
}
51
52
QCString
OutputGenerator::dir
()
const
53
{
54
return
m_dir
;
55
}
56
57
QCString
OutputGenerator::fileName
()
const
58
{
59
return
m_fileName
;
60
}
61
OutputGenerator::dir
QCString dir() const
Definition
outputgen.cpp:52
OutputGenerator::startPlainFile
void startPlainFile(const QCString &name)
Definition
outputgen.cpp:32
OutputGenerator::OutputGenerator
OutputGenerator()
Definition
outputgen.h:101
OutputGenerator::m_file
FILE * m_file
Definition
outputgen.h:120
OutputGenerator::m_dir
QCString m_dir
Definition
outputgen.h:117
OutputGenerator::endPlainFile
void endPlainFile()
Definition
outputgen.cpp:44
OutputGenerator::m_t
TextStream m_t
Definition
outputgen.h:116
OutputGenerator::fileName
QCString fileName() const
Definition
outputgen.cpp:57
OutputGenerator::m_fileName
QCString m_fileName
Definition
outputgen.h:119
QCString
This is an alternative implementation of QCString.
Definition
qcstring.h:101
doxygen.h
message.h
term
#define term(fmt,...)
Definition
message.h:137
Portable::fopen
FILE * fopen(const QCString &fileName, const QCString &mode)
Definition
portable.cpp:366
Portable::fclose
int fclose(FILE *f)
Definition
portable.cpp:386
outputgen.h
portable.h
Portable versions of functions that are platform dependent.
src
outputgen.cpp
Generated by
1.14.0