src
Main Page
Namespaces
Classes
Files
File List
File Members
parse
input.cc
Go to the documentation of this file.
1
#include "
src/parse/input.h
"
2
3
namespace
re2c
{
4
5
Input::Input
(
const
char
* fn)
6
: file (NULL)
7
, file_name (fn)
8
{}
9
10
bool
Input::open
()
11
{
12
if
(
file_name
==
"<stdin>"
)
13
{
14
file
= stdin;
15
}
16
else
17
{
18
file
= fopen (
file_name
.c_str (),
"rb"
);
19
}
20
return
file
!= NULL;
21
}
22
23
Input::~Input
()
24
{
25
if
(
file
!= NULL &&
file
!= stdin)
26
{
27
fclose (
file
);
28
}
29
}
30
31
}
// namespace re2c
re2c::Input::open
bool open()
Definition:
input.cc:10
input.h
re2c::Input::~Input
~Input()
Definition:
input.cc:23
re2c::Input::file_name
std::string file_name
Definition:
input.h:14
re2c::Input::Input
Input(const char *fn)
Definition:
input.cc:5
re2c::Input::file
FILE * file
Definition:
input.h:13
re2c
Definition:
bitmap.cc:10
Generated by
1.8.10