source: flair-src/trunk/lib/FlairCore/src/io_data.cpp @ 51

Last change on this file since 51 was 51, checked in by Sanahuja Guillaume, 5 years ago

gps

File size: 1.5 KB
RevLine 
[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:    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
21using std::string;
22
[15]23namespace flair {
24namespace core {
[2]25
26DummyType dummyType;
27FloatType floatType;
[51]28DoubleType doubleType;
[2]29SignedIntegerType Int8Type(8);
30SignedIntegerType Int16Type(16);
[51]31UnsignedIntegerType UInt8Type(8);
32UnsignedIntegerType UInt16Type(16);
[2]33
[15]34io_data::io_data(const Object *parent, string name, int n)
35    : Mutex(parent, name) {
36  pimpl_ = new io_data_impl(this, n);
[2]37}
38
[15]39io_data::~io_data() { delete pimpl_; }
[2]40
[15]41void io_data::AppendLogDescription(string description,
42                                   DataType const &datatype) {
43  pimpl_->AppendLogDescription(description, datatype);
[2]44}
45
46void io_data::SetDataTime(Time time) {
[15]47  GetMutex();
48  pimpl_->time = time;
49  ReleaseMutex();
[2]50}
51
52Time io_data::DataTime(void) const {
[15]53  Time tmp;
54  GetMutex();
55  tmp = pimpl_->time;
56  ReleaseMutex();
57  return tmp;
[2]58}
59
[15]60const io_data *io_data::Prev(int n) const {
61  if (n > 0)
62    return prev->Prev(n - 1);
63  else
64    return this;
[2]65}
66
[15]67void io_data::SetPtrToCircle(void **ptr) { pimpl_->circle_ptr = ptr; }
[2]68
69} // end namespace core
70} // end namespace flair
Note: See TracBrowser for help on using the repository browser.