use nested class in pimpl

This commit is contained in:
mutouyun 2018-12-11 17:08:13 +08:00
parent d5b5b3e0f4
commit a3c90d9f8b
4 changed files with 7 additions and 9 deletions

View File

@ -16,7 +16,6 @@ IPC_EXPORT void disconnect(handle_t h);
IPC_EXPORT bool send(handle_t h, void* data, int size);
IPC_EXPORT std::vector<byte_t> recv(handle_t h);
class channel_;
class IPC_EXPORT channel {
public:
channel(void);
@ -29,7 +28,7 @@ public:
channel& operator=(channel rhs);
private:
friend class channel_;
class channel_;
channel_* p_;
};

View File

@ -15,7 +15,6 @@ IPC_EXPORT void release(handle_t h, std::size_t size);
IPC_EXPORT void* open (handle_t h);
IPC_EXPORT void close (void* mem);
class handle_;
class IPC_EXPORT handle {
public:
handle(void);
@ -38,7 +37,7 @@ public:
void close(void);
private:
friend class handle_;
class handle_;
handle_* p_;
};

View File

@ -136,7 +136,7 @@ std::vector<byte_t> recv(handle_t h) {
} while(1);
}
class channel_ {
class channel::channel_ {
public:
};

View File

@ -5,11 +5,11 @@
namespace ipc {
namespace shm {
class handle_ {
class handle::handle_ {
public:
handle* t_ = nullptr;
handle_t h_ = nullptr;
void* m_ = nullptr;
handle* t_ = nullptr;
handle_t h_ = nullptr;
void* m_ = nullptr;
std::string n_;
std::size_t s_ = 0;