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

#include <io.hpp>

Inheritance diagram for Eng3D::IO::Asset::Base:

Public Member Functions

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...
 
virtual void open ()
 
virtual void close ()
 
virtual void read (void *, size_t)
 
virtual void write (const void *, size_t)
 
virtual void seek (Eng3D::IO::SeekType, int)
 
virtual size_t get_size (void) const
 
std::string read_all (void)
 Read the entire file into a string. More...
 

Public Attributes

std::string path
 
std::string abs_path
 

Detailed Description

Definition at line 77 of file io.hpp.

Constructor & Destructor Documentation

◆ ~Base()

virtual Eng3D::IO::Asset::Base::~Base ( )
virtualdefault

Member Function Documentation

◆ close()

virtual void Eng3D::IO::Asset::Base::close ( )
inlinevirtual

Reimplemented in Eng3D::IO::Asset::File.

Definition at line 81 of file io.hpp.

Here is the caller graph for this function:

◆ get_abs_path()

std::string Eng3D::IO::Asset::Base::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.

Parameters
asset
Returns
std::string

Definition at line 38 of file io.cpp.

◆ get_size()

virtual size_t Eng3D::IO::Asset::Base::get_size ( void  ) const
inlinevirtual

Reimplemented in Eng3D::IO::Asset::File.

Definition at line 85 of file io.hpp.

Here is the caller graph for this function:

◆ open()

virtual void Eng3D::IO::Asset::Base::open ( )
inlinevirtual

Reimplemented in Eng3D::IO::Asset::File.

Definition at line 80 of file io.hpp.

Here is the caller graph for this function:

◆ read()

virtual void Eng3D::IO::Asset::Base::read ( void *  ,
size_t   
)
inlinevirtual

Reimplemented in Eng3D::IO::Asset::File.

Definition at line 82 of file io.hpp.

Here is the caller graph for this function:

◆ read_all()

std::string Eng3D::IO::Asset::Base::read_all ( void  )
inline

Read the entire file into a string.

Returns
std::string The file contents

Definition at line 90 of file io.hpp.

Here is the call graph for this function:

◆ seek()

virtual void Eng3D::IO::Asset::Base::seek ( Eng3D::IO::SeekType  ,
int   
)
inlinevirtual

Reimplemented in Eng3D::IO::Asset::File.

Definition at line 84 of file io.hpp.

◆ write()

virtual void Eng3D::IO::Asset::Base::write ( const void *  ,
size_t   
)
inlinevirtual

Reimplemented in Eng3D::IO::Asset::File.

Definition at line 83 of file io.hpp.

Member Data Documentation

◆ abs_path

std::string Eng3D::IO::Asset::Base::abs_path

Definition at line 87 of file io.hpp.

◆ path

std::string Eng3D::IO::Asset::Base::path

Definition at line 86 of file io.hpp.


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