Symphony Of Empires
Eng3D::IO::Asset::File Struct Reference

A "file" version of the base asset, mostly to identify an asset on a physical disk. More...

#include <io.hpp>

Inheritance diagram for Eng3D::IO::Asset::File:
Collaboration diagram for Eng3D::IO::Asset::File:

Public Member Functions

virtual void open ()
 
virtual void close ()
 
virtual void read (void *buf, size_t n)
 
virtual void write (const void *buf, size_t n)
 
virtual void seek (Eng3D::IO::SeekType type, int offset)
 
virtual size_t get_size (void) const
 
- Public Member Functions inherited from Eng3D::IO::Asset::Base
virtual ~Base ()=default
 
std::string get_abs_path () const
 Get the abs path object in a safe manner, such as that the access does not occur on null pointers. Use this function because it also converts slashes between paths. More...
 
std::string read_all (void)
 Read the entire file into a string. More...
 

Public Attributes

FILE * fp = nullptr
 
- Public Attributes inherited from Eng3D::IO::Asset::Base
std::string path
 
std::string abs_path
 

Detailed Description

A "file" version of the base asset, mostly to identify an asset on a physical disk.

Definition at line 103 of file io.hpp.

Member Function Documentation

◆ close()

void Eng3D::IO::Asset::File::close ( )
virtual

Reimplemented from Eng3D::IO::Asset::Base.

Definition at line 51 of file io.cpp.

◆ get_size()

size_t Eng3D::IO::Asset::File::get_size ( void  ) const
virtual

Reimplemented from Eng3D::IO::Asset::Base.

Definition at line 74 of file io.cpp.

◆ open()

void Eng3D::IO::Asset::File::open ( )
virtual

Reimplemented from Eng3D::IO::Asset::Base.

Definition at line 45 of file io.cpp.

Here is the call graph for this function:

◆ read()

void Eng3D::IO::Asset::File::read ( void *  buf,
size_t  n 
)
virtual

Reimplemented from Eng3D::IO::Asset::Base.

Definition at line 56 of file io.cpp.

◆ seek()

void Eng3D::IO::Asset::File::seek ( Eng3D::IO::SeekType  type,
int  offset 
)
virtual

Reimplemented from Eng3D::IO::Asset::Base.

Definition at line 64 of file io.cpp.

◆ write()

void Eng3D::IO::Asset::File::write ( const void *  buf,
size_t  n 
)
virtual

Reimplemented from Eng3D::IO::Asset::Base.

Definition at line 60 of file io.cpp.

Member Data Documentation

◆ fp

FILE* Eng3D::IO::Asset::File::fp = nullptr

Definition at line 104 of file io.hpp.


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