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

Last change on this file since 2 was 2, checked in by Sanahuja Guillaume, 6 years ago

flaircore

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