mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
use nested class in pimpl
This commit is contained in:
parent
d5b5b3e0f4
commit
a3c90d9f8b
@ -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_;
|
||||
};
|
||||
|
||||
|
||||
@ -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_;
|
||||
};
|
||||
|
||||
|
||||
@ -136,7 +136,7 @@ std::vector<byte_t> recv(handle_t h) {
|
||||
} while(1);
|
||||
}
|
||||
|
||||
class channel_ {
|
||||
class channel::channel_ {
|
||||
public:
|
||||
};
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user