SHM
共有メモリを用いた高速で扱いやすいプロセス間通信マネージャ
test1.hpp

共有メモリに関するテスト

#ifndef __COMMON_H__
#define __COMMON_H__
class ClassTest
{
public:
ClassTest();
~ClassTest() {};
ClassTest(const ClassTest& test);
ClassTest& operator=(const ClassTest& test);
int a;
int b;
int c[5];
};
ClassTest::ClassTest()
{
a = 0;
b = 0;
for (int i = 0; i < 5; i++)
{
c[i] = 0;
}
}
ClassTest::ClassTest(const ClassTest& test)
: a(test.a)
, b(test.b)
{
for (int i = 0; i < 5; i++)
{
c[i] = test.c[i];
}
}
ClassTest&
ClassTest::operator=(const ClassTest& test)
{
a = test.a;
b = test.b;
for (int i = 0; i < 5; i++)
{
c[i] = test.c[i];
}
return *this;
}
#endif //__COMMON_H__