Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Public Member Functions
ext::ifdstream Class Reference

A class implementing an input stream interface, with destination specified by file descriptor. More...

#include <fdstream.hpp>

Inheritance diagram for ext::ifdstream:
[legend]
Collaboration diagram for ext::ifdstream:
[legend]

Public Member Functions

 ifdstream (int, int=FAIL_FD)
 A constructor of the input file descriptor stream with specified prefered and fallback file descriptors. More...
 
 ~ifdstream () override
 A desctructor of the input file descriptor. More...
 
bool is_redirected () const
 Getter of the redirected flag informing whether prefered or fallback file descriptor is used. More...
 

Detailed Description

A class implementing an input stream interface, with destination specified by file descriptor.

Constructor & Destructor Documentation

◆ ifdstream()

ext::ifdstream::ifdstream ( int  fd,
int  fallback_fd = FAIL_FD 
)
explicit

A constructor of the input file descriptor stream with specified prefered and fallback file descriptors.

Parameters
preferedFDthe prefered destination file descriptor
fallbackFDthe fallback destination file descriptor
Here is the call graph for this function:

◆ ~ifdstream()

ext::ifdstream::~ifdstream ( )
overridedefault

A desctructor of the input file descriptor.

Member Function Documentation

◆ is_redirected()

bool ext::ifdstream::is_redirected ( ) const

Getter of the redirected flag informing whether prefered or fallback file descriptor is used.

Returns
true if the prefered file descriptor is used or false if the fallback is used
Here is the call graph for this function:

The documentation for this class was generated from the following files: