OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::file_contents Class Reference

Class providing access to the contents of a file. More...

#include <eagine/file_contents.hpp>

Public Member Functions

 file_contents ()=default
 Default constructor.
 
 file_contents (string_view path)
 Constructor that opens and loads contents of file at the given path.
 
auto is_loaded () const noexcept -> bool
 Checks if the contents were loaded. More...
 
 operator bool () const noexcept
 Checks if the contents were loaded. More...
 
auto block () const noexcept -> memory::const_block
 Returns the block viewing the loaded file contents. More...
 
 operator memory::const_block () const noexcept
 Implicit conversion to the block viewing the loaded file contents. More...
 

Detailed Description

Class providing access to the contents of a file.

See also
structured_file_content
Examples
eagine/bindump.cpp.

Member Function Documentation

◆ block()

auto eagine::file_contents::block ( ) const -> memory::const_block
inlinenoexcept

Returns the block viewing the loaded file contents.

See also
is_loaded
Examples
eagine/bindump.cpp.

Referenced by operator memory::const_block().

◆ is_loaded()

auto eagine::file_contents::is_loaded ( ) const -> bool
inlinenoexcept

Checks if the contents were loaded.

See also
block

Referenced by operator bool().

◆ operator bool()

eagine::file_contents::operator bool ( ) const
inlineexplicitnoexcept

Checks if the contents were loaded.

See also
is_loaded

◆ operator memory::const_block()

eagine::file_contents::operator memory::const_block ( ) const
inlinenoexcept

Implicit conversion to the block viewing the loaded file contents.

See also
block
is_loaded

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

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).