Skip to content

Commit

Permalink
rename unix namespace into unix_impl and windows namespace into windo…
Browse files Browse the repository at this point in the history
…ws_impl Cylix#27
  • Loading branch information
Cylix committed Nov 23, 2016
1 parent a628e28 commit 23fdf5d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ link_directories(${GTEST_LIBS})
set(SRC_DIRS "sources" "sources/network" "sources/builders")

IF (WIN32)
set(SRC_DIRS ${SRC_DIRS} "sources/network/windows")
set(SRC_DIRS ${SRC_DIRS} "sources/network/windows_impl")
ELSE ()
set(SRC_DIRS ${SRC_DIRS} "sources/network/unix")
set(SRC_DIRS ${SRC_DIRS} "sources/network/unix_impl")
ENDIF (WIN32)

foreach(dir ${SRC_DIRS})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace cpp_redis {

namespace network {

namespace unix {
namespace unix_impl {

class io_service : public network::io_service {
public:
Expand Down Expand Up @@ -96,7 +96,7 @@ class io_service : public network::io_service {
std::recursive_mutex m_fds_mutex;
};

} //! unix
} //! unix_impl

} //! network

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace cpp_redis {

namespace network {

namespace windows {
namespace windows_impl {

typedef enum _enIoOperation {
//IO_OP_ACCEPT,
Expand Down Expand Up @@ -131,7 +131,7 @@ class io_service : public network::io_service {
std::recursive_mutex m_socket_mutex;
};

} //! windows
} //! windows_impl

} //! network

Expand Down
8 changes: 4 additions & 4 deletions sources/network/io_service.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include <cpp_redis/network/io_service.hpp>

#ifdef _WIN32
#include <cpp_redis/network/windows/io_service.hpp>
#include <cpp_redis/network/windows_impl/io_service.hpp>
#else
#include <cpp_redis/network/unix/io_service.hpp>
#include <cpp_redis/network/unix_impl/io_service.hpp>
#endif /* _WIN32 */

namespace cpp_redis {
Expand Down Expand Up @@ -36,9 +36,9 @@ io_service::get_nb_workers(void) const {
std::shared_ptr<network::io_service>
create_io_service(std::size_t nb_workers) {
#ifdef _WIN32
return std::make_shared<windows::io_service>(nb_workers);
return std::make_shared<windows_impl::io_service>(nb_workers);
#else
return std::make_shared<unix::io_service>(nb_workers);
return std::make_shared<unix_impl::io_service>(nb_workers);
#endif /* _WIN32 */
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include <fcntl.h>

#include <cpp_redis/logger.hpp>
#include <cpp_redis/network/unix/io_service.hpp>
#include <cpp_redis/network/unix_impl/io_service.hpp>
#include <cpp_redis/redis_error.hpp>

namespace cpp_redis {

namespace network {

namespace unix {
namespace unix_impl {

io_service::io_service(std::size_t nb_workers)
: network::io_service(nb_workers)
Expand Down Expand Up @@ -287,7 +287,7 @@ io_service::notify_poll(void) {
(void) write(m_notif_pipe_fds[1], "a", 1);
}

} //! unix
} //! unix_impl

} //! network

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include <cpp_redis/network/windows/io_service.hpp>
#include <cpp_redis/network/windows_impl/io_service.hpp>
#include <cpp_redis/redis_error.hpp>

namespace cpp_redis {

namespace network {

namespace windows {
namespace windows_impl {

io_service::io_service(std::size_t nb_workers)
: network::io_service(nb_workers)
Expand Down Expand Up @@ -245,7 +245,7 @@ io_service::process_io(void) {
} //while
}

} //! windows
} //! windows_impl

} //! network

Expand Down

0 comments on commit 23fdf5d

Please sign in to comment.