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 bool send(handle_t h, void* data, int size);
|
||||||
IPC_EXPORT std::vector<byte_t> recv(handle_t h);
|
IPC_EXPORT std::vector<byte_t> recv(handle_t h);
|
||||||
|
|
||||||
class channel_;
|
|
||||||
class IPC_EXPORT channel {
|
class IPC_EXPORT channel {
|
||||||
public:
|
public:
|
||||||
channel(void);
|
channel(void);
|
||||||
@ -29,7 +28,7 @@ public:
|
|||||||
channel& operator=(channel rhs);
|
channel& operator=(channel rhs);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class channel_;
|
class channel_;
|
||||||
channel_* p_;
|
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* open (handle_t h);
|
||||||
IPC_EXPORT void close (void* mem);
|
IPC_EXPORT void close (void* mem);
|
||||||
|
|
||||||
class handle_;
|
|
||||||
class IPC_EXPORT handle {
|
class IPC_EXPORT handle {
|
||||||
public:
|
public:
|
||||||
handle(void);
|
handle(void);
|
||||||
@ -38,7 +37,7 @@ public:
|
|||||||
void close(void);
|
void close(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class handle_;
|
class handle_;
|
||||||
handle_* p_;
|
handle_* p_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -136,7 +136,7 @@ std::vector<byte_t> recv(handle_t h) {
|
|||||||
} while(1);
|
} while(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
class channel_ {
|
class channel::channel_ {
|
||||||
public:
|
public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
namespace ipc {
|
namespace ipc {
|
||||||
namespace shm {
|
namespace shm {
|
||||||
|
|
||||||
class handle_ {
|
class handle::handle_ {
|
||||||
public:
|
public:
|
||||||
handle* t_ = nullptr;
|
handle* t_ = nullptr;
|
||||||
handle_t h_ = nullptr;
|
handle_t h_ = nullptr;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user