19 #ifndef COIL_SHAREDMEMORY_H 20 #define COIL_SHAREDMEMORY_H 24 #include <sys/types.h> 34 #define DEFAULT_MEMORY_SIZE 2097152 165 virtual int create(std::string shm_address,
191 virtual int open(std::string shm_address,
216 virtual int write(
const char *data,
const int pos,
const int size);
240 virtual int read(
char* data,
const int pos,
const int size);
365 std::string m_shm_address;
373 #endif // SharedMemory_h
virtual int unlink()
ファイル削除(Windowsの場合は何もしない)
virtual ~SharedMemory()
デストラクタ
virtual int close()
共有メモリの削除 。
virtual char * get_data()
メモリの取得
virtual int write(const char *data, const int pos, const int size)
共有メモリへの書き込み 。
SharedMemory & operator=(const SharedMemory &rhs)
代入演算子
virtual unsigned int get_size()
メモリのサイズ取得 。
virtual int create(std::string shm_address, int memory_size=DEFAULT_MEMORY_SIZE)
共有メモリの生成 。
virtual int open(std::string shm_address, int memory_size=DEFAULT_MEMORY_SIZE)
共有メモリへのアクセス 。
#define DEFAULT_MEMORY_SIZE
Definition: SharedMemory.h:34
SharedMemory クラス
Definition: SharedMemory.h:53
virtual std::string get_addresss()
メモリのアドレス取得 。
virtual bool created()
共有メモリに生成済みかの確認
virtual int read(char *data, const int pos, const int size)
共有メモリからの読み込み 。
Common Object Interface Layer.
Definition: Affinity.h:28