bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
bitsim::utils::io::FileReaderBase Class Reference

#include <file_reader_base.h>

Inheritance diagram for bitsim::utils::io::FileReaderBase:
Collaboration diagram for bitsim::utils::io::FileReaderBase:

Public Member Functions

virtual ~FileReaderBase ()=default
virtual void open () override
 Attempts to open the file for reading.
bool eof () const
 Returns true if the underlying stream handler has reached the EOF.
Public Member Functions inherited from bitsim::utils::io::FileHandlerBase< std::ifstream >
virtual ~FileHandlerBase ()
 Destructor. Ensures that the file is properly closed.
FileFormats::Type get_type () const noexcept
 Returns the type/format of the file.
handler_type & get_file_stream () noexcept
 Provides mutable access to the underlying file stream.
std::string get_filename () const noexcept
 Returns the file name associated with this handler.
std::filesystem::path get_file_path () const noexcept
 Returns the file path associated with this handler.
bool is_open () const noexcept
 Checks whether the file is currently open.
virtual void close ()
 Closes the file if it is currently open.

Protected Member Functions

 FileReaderBase (const std::string &file_name, FileFormats::Type t)
 Constructor.
Protected Member Functions inherited from bitsim::utils::io::FileHandlerBase< std::ifstream >
 FileHandlerBase (const std::string &file_name, FileFormats::Type t)
 Protected constructor.

Additional Inherited Members

Public Types inherited from bitsim::utils::io::FileHandlerBase< std::ifstream >
using handler_type
Protected Attributes inherited from bitsim::utils::io::FileHandlerBase< std::ifstream >
std::string file_name_
 The name of the file to read from or write to.
const FileFormats::Type t_
 The format/type of the file.
handler_type f_
 The underlying file stream/handler.

Detailed Description

Todo
write docs

Constructor & Destructor Documentation

◆ ~FileReaderBase()

virtual bitsim::utils::io::FileReaderBase::~FileReaderBase ( )
virtualdefault

◆ FileReaderBase()

bitsim::utils::io::FileReaderBase::FileReaderBase ( const std::string & file_name,
FileFormats::Type t )
protected

Constructor.

Member Function Documentation

◆ eof()

bool bitsim::utils::io::FileReaderBase::eof ( ) const
inline

Returns true if the underlying stream handler has reached the EOF.

◆ open()

void bitsim::utils::io::FileReaderBase::open ( )
overridevirtual

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