aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/CWriteFile.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 17:24:39 +1000
committerDavid Walter Seikel2013-01-13 17:24:39 +1000
commit393b5cd1dc438872af89d334ef6e5fcc59f27d47 (patch)
tree6a14521219942a08a1b95cb2f5a923a9edd60f63 /libraries/irrlicht-1.8/source/Irrlicht/CWriteFile.h
parentAdd a note about rasters suggested start up code. (diff)
downloadSledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.zip
SledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.tar.gz
SledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.tar.bz2
SledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.tar.xz
Added Irrlicht 1.8, but without all the Windows binaries.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CWriteFile.h')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/CWriteFile.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CWriteFile.h b/libraries/irrlicht-1.8/source/Irrlicht/CWriteFile.h
new file mode 100644
index 0000000..b3203ce
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/CWriteFile.h
@@ -0,0 +1,58 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __C_WRITE_FILE_H_INCLUDED__
6#define __C_WRITE_FILE_H_INCLUDED__
7
8#include <stdio.h>
9#include "IWriteFile.h"
10#include "irrString.h"
11
12namespace irr
13{
14
15namespace io
16{
17
18 /*!
19 Class for writing a real file to disk.
20 */
21 class CWriteFile : public IWriteFile
22 {
23 public:
24
25 CWriteFile(const io::path& fileName, bool append);
26
27 virtual ~CWriteFile();
28
29 //! Reads an amount of bytes from the file.
30 virtual s32 write(const void* buffer, u32 sizeToWrite);
31
32 //! Changes position in file, returns true if successful.
33 virtual bool seek(long finalPos, bool relativeMovement = false);
34
35 //! Returns the current position in the file.
36 virtual long getPos() const;
37
38 //! Returns name of file.
39 virtual const io::path& getFileName() const;
40
41 //! returns if file is open
42 bool isOpen() const;
43
44 private:
45
46 //! opens the file
47 void openFile(bool append);
48
49 io::path Filename;
50 FILE* File;
51 long FileSize;
52 };
53
54} // end namespace io
55} // end namespace irr
56
57#endif
58