Panda3D
pandatool
src
lwo
iffInputFile.I
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file iffInputFile.I
10
* @author drose
11
* @date 2001-04-24
12
*/
13
14
/**
15
* Indicates the filename that the InputFile is currently opened on.
16
*/
17
INLINE
void
IffInputFile::
18
set_filename
(
const
Filename
&filename) {
19
_filename = filename;
20
}
21
22
/**
23
* Returns the filename that the InputFile is currently opened on, if
24
* available.
25
*/
26
INLINE
const
Filename
&
IffInputFile::
27
get_filename
()
const
{
28
return
_filename;
29
}
30
31
/**
32
* Returns true if the last read operation failed because of reaching EOF,
33
* false otherwise.
34
*/
35
INLINE
bool
IffInputFile::
36
is_eof
()
const
{
37
return
_eof;
38
}
39
40
/**
41
* Returns the number of bytes read so far from the input file.
42
*/
43
INLINE
size_t
IffInputFile::
44
get_bytes_read
()
const
{
45
return
_bytes_read;
46
}
47
48
/**
49
* If the current file pointer is not positioned on an even-byte boundary,
50
* reads and discards one byte so that it is.
51
*/
52
INLINE
void
IffInputFile::
53
align
() {
54
if
((_bytes_read & 1) != 0) {
55
get_int8
();
56
}
57
}
IffInputFile::align
void align()
If the current file pointer is not positioned on an even-byte boundary, reads and discards one byte s...
Definition:
iffInputFile.I:53
IffInputFile::set_filename
void set_filename(const Filename &filename)
Indicates the filename that the InputFile is currently opened on.
Definition:
iffInputFile.I:18
IffInputFile::get_bytes_read
size_t get_bytes_read() const
Returns the number of bytes read so far from the input file.
Definition:
iffInputFile.I:44
IffInputFile::get_int8
int8_t get_int8()
Extracts a signed 8-bit integer.
Definition:
iffInputFile.cxx:87
IffInputFile::get_filename
const Filename & get_filename() const
Returns the filename that the InputFile is currently opened on, if available.
Definition:
iffInputFile.I:27
Filename
The name of a file, such as a texture file or an Egg file.
Definition:
filename.h:39
IffInputFile::is_eof
bool is_eof() const
Returns true if the last read operation failed because of reaching EOF, false otherwise.
Definition:
iffInputFile.I:36
Generated on Wed Jan 23 2019 21:40:20 for Panda3D by
1.8.15