source: flair-src/trunk/lib/FlairCore/src/unexported/IODevice_impl.h@ 15

Last change on this file since 15 was 15, checked in by Bayard Gildas, 6 years ago

sources reformatted with flair-format-dir script

File size: 1.6 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/*!
6 * \file IODevice_impl.h
7 * \brief Classe de base pour un système à entrées/sorties
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2011/05/01
10 * \version 4.0
11 */
12
13#ifndef IO_DEVICE_IMPL_H
14#define IO_DEVICE_IMPL_H
15
16#include <string>
17#include <Object.h>
18
19namespace flair {
20namespace core {
21class io_data;
22class IODevice;
23class Thread;
24class Mutex;
25class FrameworkManager;
26class SharedMem;
27}
28}
29
30class FrameworkManager_impl;
31
32class IODevice_impl {
33public:
34 IODevice_impl(const flair::core::IODevice *self);
35 ~IODevice_impl();
36 void ResumeThread(void);
37 size_t LogSize(void) const;
38 void AppendLog(char **ptr);
39 void AddDataToLog(const flair::core::io_data *data);
40 void WriteLogsDescriptors(std::fstream &desc_file, int *index);
41 int SetToWake(const flair::core::Thread *thread);
42 void WriteLog(flair::core::Time time);
43 void AddDeviceToLog(const flair::core::IODevice *device);
44 bool SetToBeLogged(void); // return true if possible
45 void OutputToShMem(bool enabled);
46 void WriteToShMem(void);
47 void PrintLogsDescriptors(void);
48
49private:
50 std::vector<const flair::core::IODevice *> devicesToLog;
51 const flair::core::IODevice *self;
52 const flair::core::FrameworkManager *framework;
53 FrameworkManager_impl *framework_impl;
54 std::vector<const flair::core::io_data *> datasToLog;
55 flair::core::Thread *thread_to_wake;
56 flair::core::Mutex *wake_mutex;
57 bool tobelogged;
58 bool outputtoshm;
59 flair::core::SharedMem *shmem;
60};
61
62#endif // IO_DEVICE_IMPL_H
Note: See TracBrowser for help on using the repository browser.