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 { namespace core {
|
---|
24 |
|
---|
25 | DummyType dummyType;
|
---|
26 | FloatType floatType;
|
---|
27 | SignedIntegerType Int8Type(8);
|
---|
28 | SignedIntegerType Int16Type(16);
|
---|
29 |
|
---|
30 | io_data::io_data(const Object* parent,string name,int n): Mutex(parent,name) {
|
---|
31 | pimpl_=new io_data_impl(this,n);
|
---|
32 | }
|
---|
33 |
|
---|
34 | io_data::~io_data() {
|
---|
35 | delete pimpl_;
|
---|
36 | }
|
---|
37 |
|
---|
38 | void io_data::AppendLogDescription(string description,DataType const &datatype) {
|
---|
39 | pimpl_->AppendLogDescription(description,datatype);
|
---|
40 | }
|
---|
41 |
|
---|
42 | void io_data::SetDataTime(Time time) {
|
---|
43 | GetMutex();
|
---|
44 | pimpl_->time=time;
|
---|
45 | ReleaseMutex();
|
---|
46 | }
|
---|
47 |
|
---|
48 | Time io_data::DataTime(void) const {
|
---|
49 | Time tmp;
|
---|
50 | GetMutex();
|
---|
51 | tmp=pimpl_->time;
|
---|
52 | ReleaseMutex();
|
---|
53 | return tmp;
|
---|
54 | }
|
---|
55 |
|
---|
56 | const 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 |
|
---|
63 | void 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.