Last change
on this file since 49 was 15, checked in by Bayard Gildas, 8 years ago |
sources reformatted with flair-format-dir script
|
File size:
1.4 KB
|
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: 2012/03/21
|
---|
| 6 | // filename: io_data.cpp
|
---|
| 7 | //
|
---|
| 8 | // author: Guillaume Sanahuja
|
---|
| 9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 10 | //
|
---|
| 11 | // version: $Id: $
|
---|
| 12 | //
|
---|
| 13 | // purpose: Abstract class for data types
|
---|
| 14 | //
|
---|
| 15 | //
|
---|
| 16 | /*********************************************************************/
|
---|
| 17 |
|
---|
| 18 | #include "io_data.h"
|
---|
| 19 | #include "io_data_impl.h"
|
---|
| 20 |
|
---|
| 21 | using std::string;
|
---|
| 22 |
|
---|
| 23 | namespace flair {
|
---|
| 24 | namespace core {
|
---|
| 25 |
|
---|
| 26 | DummyType dummyType;
|
---|
| 27 | FloatType floatType;
|
---|
| 28 | SignedIntegerType Int8Type(8);
|
---|
| 29 | SignedIntegerType Int16Type(16);
|
---|
| 30 |
|
---|
| 31 | io_data::io_data(const Object *parent, string name, int n)
|
---|
| 32 | : Mutex(parent, name) {
|
---|
| 33 | pimpl_ = new io_data_impl(this, n);
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 | io_data::~io_data() { delete pimpl_; }
|
---|
| 37 |
|
---|
| 38 | void io_data::AppendLogDescription(string description,
|
---|
| 39 | DataType const &datatype) {
|
---|
| 40 | pimpl_->AppendLogDescription(description, datatype);
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | void io_data::SetDataTime(Time time) {
|
---|
| 44 | GetMutex();
|
---|
| 45 | pimpl_->time = time;
|
---|
| 46 | ReleaseMutex();
|
---|
| 47 | }
|
---|
| 48 |
|
---|
| 49 | Time io_data::DataTime(void) const {
|
---|
| 50 | Time tmp;
|
---|
| 51 | GetMutex();
|
---|
| 52 | tmp = pimpl_->time;
|
---|
| 53 | ReleaseMutex();
|
---|
| 54 | return tmp;
|
---|
| 55 | }
|
---|
| 56 |
|
---|
| 57 | const io_data *io_data::Prev(int n) const {
|
---|
| 58 | if (n > 0)
|
---|
| 59 | return prev->Prev(n - 1);
|
---|
| 60 | else
|
---|
| 61 | return this;
|
---|
| 62 | }
|
---|
| 63 |
|
---|
| 64 | void io_data::SetPtrToCircle(void **ptr) { pimpl_->circle_ptr = ptr; }
|
---|
| 65 |
|
---|
| 66 | } // end namespace core
|
---|
| 67 | } // end namespace flair
|
---|
Note:
See
TracBrowser
for help on using the repository browser.