Fling Engine  0.00.1
Fling Engine is a game engine written in Vulkan
Public Member Functions | Private Member Functions | Private Attributes
Fling::File Class Reference

A file is a basic text file that contains a basic text file. More...

#include <File.h>

Inherits Fling::Resource.

Public Member Functions

 File (Guid t_ID)
 Construct a new File object. More...
 
const char * GetData () const
 Get char* that represents the text in this file. More...
 
size_t GetFileLength () const
 Get the File Length object. More...
 
bool IsLoaded () const
 Returns true if this file resource is loaded or not (i.e. More...
 
- Public Member Functions inherited from Fling::Resource
 Resource (Fling::Guid t_ID)
 
virtual ~Resource ()=default
 
Fling::Guid_Handle GetGuidHandle () const
 Get GUID handle (just an int) for this resources guid. More...
 
std::string GetGuidString () const
 Get the human-readable string representation of this GUID. More...
 
std::string GetFilepathReleativeToAssets () const
 Returns the full file path that is relative to the assets path based on the GUID of this resource. More...
 

Private Member Functions

void LoadFile ()
 Loads the file based on Guid path. More...
 

Private Attributes

std::vector< char > m_Characters
 Array of characters that represents this file. More...
 

Additional Inherited Members

- Protected Attributes inherited from Fling::Resource
Fling::Guid m_Guid
 

Detailed Description

A file is a basic text file that contains a basic text file.

Constructor & Destructor Documentation

◆ File()

Fling::File::File ( Guid  t_ID)
explicit

Construct a new File object.

Parameters
t_IDThe GUID that represents the file path to this file.

Member Function Documentation

◆ GetData()

const char* Fling::File::GetData ( ) const
inline

Get char* that represents the text in this file.

Returns
const char*

◆ GetFileLength()

size_t Fling::File::GetFileLength ( ) const
inline

Get the File Length object.

Returns
size_t Length of the file in characters

◆ IsLoaded()

bool Fling::File::IsLoaded ( ) const
inline

Returns true if this file resource is loaded or not (i.e.

has any characters in the file)

◆ LoadFile()

void Fling::File::LoadFile ( )
private

Loads the file based on Guid path.

Note
All Guid paths are relative to the assets directory.

Field Documentation

◆ m_Characters

std::vector<char> Fling::File::m_Characters
private

Array of characters that represents this file.


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