From 3b004486a0dbcdcb586b5f190aef980294729926 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 28 Mar 2017 18:48:11 +0300 Subject: Move virtfsfuncs.h into virtfs directory. --- src/CMakeLists.txt | 4 +-- src/Makefile.am | 2 +- src/fs/virtfs/virtfs.cpp | 2 +- src/fs/virtfs/virtfsdir.cpp | 2 +- src/fs/virtfs/virtfsfuncs.h | 88 +++++++++++++++++++++++++++++++++++++++++++++ src/fs/virtfs/virtfszip.cpp | 2 +- src/fs/virtfsfuncs.h | 88 --------------------------------------------- 7 files changed, 94 insertions(+), 94 deletions(-) create mode 100644 src/fs/virtfs/virtfsfuncs.h delete mode 100644 src/fs/virtfsfuncs.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6532d0455..983f0e26b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -883,7 +883,7 @@ SET(SRCS utils/perfomance.cpp utils/perfomance.h utils/debugmemoryobject.h - fs/virtfsfuncs.h + fs/virtfs/virtfsfuncs.h fs/virtfsrwops.cpp fs/virtfsrwops.h fs/virtfstools.cpp @@ -1784,7 +1784,7 @@ SET(DYE_CMD_SRCS fs/paths.h utils/perfomance.cpp utils/perfomance.h - fs/virtfsfuncs.h + fs/virtfs/virtfsfuncs.h fs/virtfsrwops.cpp fs/virtfsrwops.h fs/virtfstools.cpp diff --git a/src/Makefile.am b/src/Makefile.am index 7a7c19b48..036a2770d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -570,7 +570,7 @@ BASE_SRC += events/actionevent.h \ utils/perfomance.cpp \ utils/perfomance.h \ utils/debugmemoryobject.h \ - fs/virtfsfuncs.h \ + fs/virtfs/virtfsfuncs.h \ fs/virtfsrwops.cpp \ fs/virtfsrwops.h \ fs/virtfstools.cpp \ diff --git a/src/fs/virtfs/virtfs.cpp b/src/fs/virtfs/virtfs.cpp index 19e42fab7..940bdb055 100644 --- a/src/fs/virtfs/virtfs.cpp +++ b/src/fs/virtfs/virtfs.cpp @@ -26,7 +26,7 @@ #include "fs/virtfs/virtdirentry.h" #include "fs/virtfs/virtfile.h" #include "fs/virtfs/virtfsdir.h" -#include "fs/virtfsfuncs.h" +#include "fs/virtfs/virtfsfuncs.h" #include "fs/virtfs/virtfszip.h" #include "fs/virtlist.h" #include "fs/virtfs/virtzipentry.h" diff --git a/src/fs/virtfs/virtfsdir.cpp b/src/fs/virtfs/virtfsdir.cpp index ba1961649..4e847f6cb 100644 --- a/src/fs/virtfs/virtfsdir.cpp +++ b/src/fs/virtfs/virtfsdir.cpp @@ -27,7 +27,7 @@ #include "fs/virtfs/virtdirentry.h" #include "fs/virtfs/virtfile.h" #include "fs/virtfs/virtfileprivate.h" -#include "fs/virtfsfuncs.h" +#include "fs/virtfs/virtfsfuncs.h" #include "fs/virtlist.h" #include "utils/checkutils.h" diff --git a/src/fs/virtfs/virtfsfuncs.h b/src/fs/virtfs/virtfsfuncs.h new file mode 100644 index 000000000..46bcd86ff --- /dev/null +++ b/src/fs/virtfs/virtfsfuncs.h @@ -0,0 +1,88 @@ +/* + * The ManaPlus Client + * Copyright (C) 2013-2017 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef UTILS_VIRTFSFUNCS_H +#define UTILS_VIRTFSFUNCS_H + +#include "utils/stringvector.h" + +#include "localconsts.h" + +struct VirtFile; +struct VirtFsEntry; + +struct VirtFsFuncs final +{ + VirtFsFuncs() : + close(nullptr), + read(nullptr), + write(nullptr), + fileLength(nullptr), + tell(nullptr), + seek(nullptr), + exists(nullptr), + getRealDir(nullptr), + enumerate(nullptr), + isDirectory(nullptr), + openRead(nullptr), + openWrite(nullptr), + openAppend(nullptr), + eof(nullptr) + { + } + + A_DELETE_COPY(VirtFsFuncs) + + int (*close) (VirtFile *restrict const file); + int64_t (*read) (VirtFile *restrict const file, + void *restrict const buffer, + const uint32_t objSize, + const uint32_t objCount); + int64_t (*write) (VirtFile *restrict const file, + const void *restrict const buffer, + const uint32_t objSize, + const uint32_t objCount); + int64_t (*fileLength) (VirtFile *restrict const file); + int64_t (*tell) (VirtFile *restrict const file); + int (*seek) (VirtFile *restrict const file, + const uint64_t pos); + bool (*exists) (VirtFsEntry *restrict const entry, + const std::string &filename, + const std::string &dirName); + bool (*getRealDir) (VirtFsEntry *restrict const entry, + const std::string &filename, + const std::string &dirName, + std::string &realDir); + void (*enumerate) (VirtFsEntry *restrict const entry, + const std::string &dirName, + StringVect &names); + bool (*isDirectory) (VirtFsEntry *restrict const entry, + const std::string &dirName, + bool &isDirFlag); + VirtFile *(*openRead) (VirtFsEntry *restrict const entry, + const std::string &filename); + VirtFile *(*openWrite) (VirtFsEntry *restrict const entry, + const std::string &filename); + VirtFile *(*openAppend) (VirtFsEntry *restrict const entry, + const std::string &filename); + int (*eof) (VirtFile *restrict const file); +}; + +#endif // UTILS_VIRTFSFUNCS_H diff --git a/src/fs/virtfs/virtfszip.cpp b/src/fs/virtfs/virtfszip.cpp index a28f4d89f..ce08b935b 100644 --- a/src/fs/virtfs/virtfszip.cpp +++ b/src/fs/virtfs/virtfszip.cpp @@ -22,7 +22,7 @@ #include "fs/virtfs/virtfile.h" #include "fs/virtfs/virtfileprivate.h" -#include "fs/virtfsfuncs.h" +#include "fs/virtfs/virtfsfuncs.h" #include "fs/virtlist.h" #include "fs/virtfs/virtzipentry.h" #include "fs/virtfs/zip.h" diff --git a/src/fs/virtfsfuncs.h b/src/fs/virtfsfuncs.h deleted file mode 100644 index 46bcd86ff..000000000 --- a/src/fs/virtfsfuncs.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * The ManaPlus Client - * Copyright (C) 2013-2017 The ManaPlus Developers - * - * This file is part of The ManaPlus Client. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef UTILS_VIRTFSFUNCS_H -#define UTILS_VIRTFSFUNCS_H - -#include "utils/stringvector.h" - -#include "localconsts.h" - -struct VirtFile; -struct VirtFsEntry; - -struct VirtFsFuncs final -{ - VirtFsFuncs() : - close(nullptr), - read(nullptr), - write(nullptr), - fileLength(nullptr), - tell(nullptr), - seek(nullptr), - exists(nullptr), - getRealDir(nullptr), - enumerate(nullptr), - isDirectory(nullptr), - openRead(nullptr), - openWrite(nullptr), - openAppend(nullptr), - eof(nullptr) - { - } - - A_DELETE_COPY(VirtFsFuncs) - - int (*close) (VirtFile *restrict const file); - int64_t (*read) (VirtFile *restrict const file, - void *restrict const buffer, - const uint32_t objSize, - const uint32_t objCount); - int64_t (*write) (VirtFile *restrict const file, - const void *restrict const buffer, - const uint32_t objSize, - const uint32_t objCount); - int64_t (*fileLength) (VirtFile *restrict const file); - int64_t (*tell) (VirtFile *restrict const file); - int (*seek) (VirtFile *restrict const file, - const uint64_t pos); - bool (*exists) (VirtFsEntry *restrict const entry, - const std::string &filename, - const std::string &dirName); - bool (*getRealDir) (VirtFsEntry *restrict const entry, - const std::string &filename, - const std::string &dirName, - std::string &realDir); - void (*enumerate) (VirtFsEntry *restrict const entry, - const std::string &dirName, - StringVect &names); - bool (*isDirectory) (VirtFsEntry *restrict const entry, - const std::string &dirName, - bool &isDirFlag); - VirtFile *(*openRead) (VirtFsEntry *restrict const entry, - const std::string &filename); - VirtFile *(*openWrite) (VirtFsEntry *restrict const entry, - const std::string &filename); - VirtFile *(*openAppend) (VirtFsEntry *restrict const entry, - const std::string &filename); - int (*eof) (VirtFile *restrict const file); -}; - -#endif // UTILS_VIRTFSFUNCS_H -- cgit v1.2.3-70-g09d2