Last change
on this file since 105 was 15, checked in by Bayard Gildas, 8 years ago |
sources reformatted with flair-format-dir script
|
File size:
968 bytes
|
Rev | Line | |
---|
[2] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[2] | 4 | // %flair:license}
|
---|
| 5 | // created: 2014/02/10
|
---|
| 6 | // filename: SharedMem.cpp
|
---|
| 7 | //
|
---|
| 8 | // author: Guillaume Sanahuja
|
---|
| 9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 10 | //
|
---|
| 11 | // version: $Id: $
|
---|
| 12 | //
|
---|
| 13 | // purpose: Class defining a shared memory
|
---|
| 14 | //
|
---|
| 15 | //
|
---|
| 16 | /*********************************************************************/
|
---|
| 17 |
|
---|
| 18 | #include "SharedMem.h"
|
---|
| 19 | #include "SharedMem_impl.h"
|
---|
| 20 |
|
---|
| 21 | using std::string;
|
---|
| 22 |
|
---|
[15] | 23 | namespace flair {
|
---|
| 24 | namespace core {
|
---|
[2] | 25 |
|
---|
[15] | 26 | SharedMem::SharedMem(const Object *parent, string name, size_t size)
|
---|
| 27 | : Object(parent, name, "shmem") {
|
---|
| 28 | pimpl_ = new SharedMem_impl(this, name, size);
|
---|
[2] | 29 | }
|
---|
| 30 |
|
---|
[15] | 31 | SharedMem::~SharedMem() { delete pimpl_; }
|
---|
[2] | 32 |
|
---|
[15] | 33 | void SharedMem::Write(const char *buf, size_t size) {
|
---|
| 34 | pimpl_->Write(buf, size);
|
---|
[2] | 35 | }
|
---|
| 36 |
|
---|
[15] | 37 | void SharedMem::Read(char *buf, size_t size) const { pimpl_->Read(buf, size); }
|
---|
[2] | 38 |
|
---|
| 39 | } // end namespace core
|
---|
| 40 | } // end namespace flair
|
---|
Note:
See
TracBrowser
for help on using the repository browser.