shm.h

来自「一套linux下的C++开发库」· C头文件 代码 · 共 50 行

H
50
字号
/***************************************************************************                          shm.h  -  description                             -------------------    begin                : Fri Jul 20 2001    copyright            : (C) 2001 by Mark    email                : alben@yeah.net ***************************************************************************//*************************************************************************** *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * ***************************************************************************/#ifndef SHM_H#define SHM_H#include <sys/ipc.h>#include <sys/shm.h>#include <tinycxx/exception.h>class CShm{public:	CShm(key_t tKey, int iSize, int iMode = 0600);	virtual ~CShm();		void GetShm(int iMode = 0600);	void AttachShm();	void DetachShm();	void RemoveShm();	bool IfCreate() { return m_bCreate; }	void InitShm();	protected:	const key_t m_tShmKey;	const int m_iShmSize;	int m_iShmId;	char* m_pchShm;	int m_bCreate;};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?