Last change
on this file since 2 was 2, checked in by Sanahuja Guillaume, 8 years ago |
flaircore
|
File size:
967 bytes
|
Rev | Line | |
---|
| 1 | // %flair:license{
|
---|
| 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
| 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 |
|
---|
| 23 | namespace flair
|
---|
| 24 | {
|
---|
| 25 | namespace core
|
---|
| 26 | {
|
---|
| 27 |
|
---|
| 28 | SharedMem::SharedMem(const Object* parent,string name,size_t size): Object(parent,name,"shmem")
|
---|
| 29 | {
|
---|
| 30 | pimpl_=new SharedMem_impl(this,name,size);
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | SharedMem::~SharedMem()
|
---|
| 34 | {
|
---|
| 35 | delete pimpl_;
|
---|
| 36 | }
|
---|
| 37 |
|
---|
| 38 | void SharedMem::Write(const char* buf,size_t size)
|
---|
| 39 | {
|
---|
| 40 | pimpl_->Write(buf,size);
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | void SharedMem::Read(char* buf,size_t size) const
|
---|
| 44 | {
|
---|
| 45 | pimpl_->Read(buf,size);
|
---|
| 46 | }
|
---|
| 47 |
|
---|
| 48 | } // end namespace core
|
---|
| 49 | } // end namespace flair
|
---|
Note:
See
TracBrowser
for help on using the repository browser.