aboutsummaryrefslogtreecommitdiff
path: root/backends/file
diff options
context:
space:
mode:
Diffstat (limited to 'backends/file')
-rw-r--r--backends/file/base-file.cpp4
-rw-r--r--backends/file/base-file.h8
-rw-r--r--backends/file/posix/posix-file.cpp4
-rw-r--r--backends/file/posix/posix-file.h4
4 files changed, 18 insertions, 2 deletions
diff --git a/backends/file/base-file.cpp b/backends/file/base-file.cpp
index 3174f5828c..e42f50ce98 100644
--- a/backends/file/base-file.cpp
+++ b/backends/file/base-file.cpp
@@ -37,6 +37,8 @@
#include "CoreFoundation/CoreFoundation.h"
#endif
+namespace Common {
+
BaseFile::BaseFile() {
_handle = 0;
_ioFailed = false;
@@ -224,3 +226,5 @@ long BaseFile::_ftell(FILE *stream) const {
int BaseFile::_fwrite(const void * ptr, size_t obj_size, size_t count, FILE * stream) {
return fwrite(ptr, obj_size, count, stream);
}
+
+} // End of namespace Common
diff --git a/backends/file/base-file.h b/backends/file/base-file.h
index f383a1a453..d28655b31e 100644
--- a/backends/file/base-file.h
+++ b/backends/file/base-file.h
@@ -30,12 +30,14 @@
#include "common/str.h"
#include "common/stream.h"
-using namespace Common;
+//using namespace Common;
+
+namespace Common {
/**
* Implements several file related functions used by the Common::File wrapper.
*/
-class BaseFile : public Common::SeekableReadStream {
+class BaseFile : public SeekableReadStream {
protected:
/** File handle to the actual file; 0 if no file is open. */
void *_handle;
@@ -177,4 +179,6 @@ public:
//uint32 write(const void *dataPtr, uint32 dataSize);
};
+} // End of namespace Common
+
#endif //BACKENDS_BASE_FILE_H
diff --git a/backends/file/posix/posix-file.cpp b/backends/file/posix/posix-file.cpp
index 84c82fa5c5..7419161ccd 100644
--- a/backends/file/posix/posix-file.cpp
+++ b/backends/file/posix/posix-file.cpp
@@ -1,5 +1,7 @@
#include "backends/file/posix/posix-file.h"
+namespace Common {
+
POSIXFile::POSIXFile() : BaseFile() {
//
}
@@ -39,3 +41,5 @@ long POSIXFile::_ftell(FILE *stream) const {
int POSIXFile::_fwrite(const void * ptr, size_t obj_size, size_t count, FILE * stream) {
return fwrite(ptr, obj_size, count, stream);
}
+
+} // End of namespace Common
diff --git a/backends/file/posix/posix-file.h b/backends/file/posix/posix-file.h
index 00ce307df5..e74338b8d8 100644
--- a/backends/file/posix/posix-file.h
+++ b/backends/file/posix/posix-file.h
@@ -27,6 +27,8 @@
#include "backends/file/base-file.cpp"
+namespace Common {
+
/**
* Implements several POSIX specific file related functions used by the Common::File wrapper.
*
@@ -47,4 +49,6 @@ protected:
int _fwrite(const void * ptr, size_t obj_size, size_t count, FILE * stream);
};
+} // End of namespace Common
+
#endif //BACKENDS_POSIX_FILE_H