trikRuntime
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
inputDeviceFileInterface.h
Go to the documentation of this file.
1
/* Copyright 2015 Yurii Litvinov and CyberTech Labs Ltd.
2
*
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License. */
14
15
#pragma once
16
17
#include <QtCore/QTextStream>
18
19
namespace
trikHal
{
20
22
class
InputDeviceFileInterface
23
{
24
Q_DISABLE_COPY(
InputDeviceFileInterface
)
25
public
:
26
InputDeviceFileInterface
() =
default
;
27
virtual
~InputDeviceFileInterface
() =
default
;
28
30
virtual
bool
open
() = 0;
31
33
virtual
void
close
() = 0;
34
36
virtual
QTextStream &
stream
() = 0;
37
39
virtual
void
reset
() = 0;
40
};
41
42
}
trikHal::InputDeviceFileInterface::~InputDeviceFileInterface
virtual ~InputDeviceFileInterface()=default
trikHal::InputDeviceFileInterface::reset
virtual void reset()=0
Resets input file, moving file cursor to the beginning of the file.
trikHal::InputDeviceFileInterface::stream
virtual QTextStream & stream()=0
Returns temporary reference to a stream which can be used to read from a file.
trikHal::InputDeviceFileInterface
Input device file abstraction. Can read from a device file, thus communicating with a device driver...
Definition:
inputDeviceFileInterface.h:22
trikHal::InputDeviceFileInterface::InputDeviceFileInterface
InputDeviceFileInterface()=default
trikHal::InputDeviceFileInterface::close
virtual void close()=0
Close a file.
trikHal::InputDeviceFileInterface::open
virtual bool open()=0
Open a file. File name must be set previously.
trikHal
Definition:
brickFactory.h:21
trikHal
include
trikHal
inputDeviceFileInterface.h
Generated by
1.8.11