![]() |
GM6000 Digital Heater Controller Build: 20 (Branch = develop)
SDX-1330
|
This concrete class implements a Input stream using the underlying platform's native OS 'file interface' for the C library's stdin, stdout, and stderr streams. More...
This concrete class implements a Input stream using the underlying platform's native OS 'file interface' for the C library's stdin, stdout, and stderr streams.
This class is intended to be a helper class and/or implementation inheritance parent class than an class used directly by the Application.
#include <Input_.h>
Public Member Functions | |
| Input_ (int fd) | |
| Constructor. | |
| Input_ (void *handle) | |
| Constructor. | |
| Input_ (Cpl::Io::Descriptor streamfd) | |
| Constructor. | |
| Input_ (void) | |
| Constructor. | |
| ~Input_ (void) | |
| Destructor. | |
| void | activate (int fd) |
| Activates and/or resets the underlying 'fd' for the stream. | |
| void | activate (void *handle) |
| Activates and/or resets the underlying 'handle' for the stream. | |
| void | activate (Cpl::Io::Descriptor streamfd) |
| Activates and/or resets the underlying 'streamfd' for the stream. | |
| bool | isOpened () |
| This method returns true if the file was successfully open and/or is still opened (i.e. | |
| bool | read (void *buffer, int numBytes, int &bytesRead) |
| See Cpl::Io::Input. | |
| bool | available () |
| See Cpl::Io::Input. | |
| bool | isEos () |
| See Cpl::Io::IsEos. | |
| void | close () |
| See Cpl::Io::Input. | |
Public Member Functions inherited from Cpl::Io::Input | |
| virtual bool | read (char &c) |
| Reads a single byte from the stream. | |
| virtual bool | read (Cpl::Text::String &destString) |
| Reads N bytes into the String's internal buffer. | |
| virtual | ~Input () |
| Lets the make the destructor virtual. | |
Public Member Functions inherited from Cpl::Io::Close | |
| virtual | ~Close () |
| Lets the make the destructor virtual. | |
Public Member Functions inherited from Cpl::Container::Item | |
| bool | insert_ (void *newContainerPtr) |
| Helper method to trap when inserting an item in multiple containers. | |
| bool | isInContainer_ (const void *containerPtr) const noexcept |
| Returns 'true' if the instance is in the specified container. | |
Public Member Functions inherited from Cpl::Io::IsEos | |
| virtual | ~IsEos () |
| Lets the make the destructor virtual. | |
Protected Attributes | |
| Cpl::Io::Descriptor | m_inFd |
| Stream Handle. | |
| bool | m_inEos |
| Cache end-of-stream status. | |
Friends | |
| class | InputOutput_ |
| class | Cpl::Io::File::Input |
| class | Cpl::Io::File::InputOutput |
Additional Inherited Members | |
Static Public Member Functions inherited from Cpl::Container::Item | |
| static void | remove_ (Item *itemPtr) noexcept |
| Helper method to do the proper 'clean-up' for the multiple-containers-error-trap when removing an item from a container. | |
Public Attributes inherited from Cpl::Container::Item | |
| void * | m_nextPtr_ |
| The link field. | |
| void * | m_inListPtr_ |
| Debug field. | |
Protected Member Functions inherited from Cpl::Container::Item | |
| Item () | |
| Constructor. | |
| Item (const char *) | |
| Constructor used ONLY with the child class MapItem: -->special constructor to allow a Map to be statically allocated. | |
| Cpl::Io::Stdio::Input_::Input_ | ( | int | fd | ) |
Constructor.
'fd' is a the 'file/stream descriptor' of a existing/opened stream.
| Cpl::Io::Stdio::Input_::Input_ | ( | void * | handle | ) |
Constructor.
'handle' is a the 'file/stream descriptor' of a existing/opened stream.
| Cpl::Io::Stdio::Input_::Input_ | ( | Cpl::Io::Descriptor | streamfd | ) |
Constructor.
'streamfd' is a the 'file/stream descriptor' of a existing/opened stream.
| Cpl::Io::Stdio::Input_::Input_ | ( | void | ) |
Constructor.
No underlying file descriptor - the stream must be activated before using
| Cpl::Io::Stdio::Input_::~Input_ | ( | void | ) |
Destructor.
| void Cpl::Io::Stdio::Input_::activate | ( | Cpl::Io::Descriptor | streamfd | ) |
Activates and/or resets the underlying 'streamfd' for the stream.
If the current 'fd' is not in the closed state - a fatal error is generated
| void Cpl::Io::Stdio::Input_::activate | ( | int | fd | ) |
Activates and/or resets the underlying 'fd' for the stream.
If the current 'fd' is not in the closed state - a fatal error is generated
| void Cpl::Io::Stdio::Input_::activate | ( | void * | handle | ) |
Activates and/or resets the underlying 'handle' for the stream.
If the current 'fd' is not in the closed state - a fatal error is generated
|
virtual |
See Cpl::Io::Input.
Implements Cpl::Io::Input.
|
virtual |
|
virtual |
See Cpl::Io::IsEos.
Implements Cpl::Io::IsEos.
| bool Cpl::Io::Stdio::Input_::isOpened | ( | ) |
This method returns true if the file was successfully open and/or is still opened (i.e.
close() has not been called). Note: it is okay to call other methods in the class if the file is not open - i.e. nothing 'bad' will happen and the method will return 'failed' status (when appropriate).
|
virtual |
See Cpl::Io::Input.
Implements Cpl::Io::Input.
|
protected |
Cache end-of-stream status.
|
protected |
Stream Handle.