hx3d  1
2D/3D Simple Game Framework
Public Member Functions | Static Public Member Functions | List of all members
hx3d::File Class Reference

File loading abstraction. More...

#include <file.hpp>

Public Member Functions

std::string toString ()
 Return the file content as a string. More...
 
size_t getSize () const
 Get the file size. More...
 
char * getData () const
 Get the file data as an 8-bit array. More...
 

Static Public Member Functions

static Ptr< FileloadAsciiFile (std::string path)
 Load an ascii file from a path. More...
 
static Ptr< FileloadBinaryFile (std::string path)
 Load a binary file from a path. More...
 
static void writeInternalAsciiFile (std::string path, std::string content)
 Write to an internal ascii file. More...
 
static Ptr< FileloadInternalAsciiFile (std::string path)
 Load an internal ascii file. More...
 

Detailed Description

File loading abstraction.

Definition at line 34 of file file.hpp.

Member Function Documentation

char * hx3d::File::getData ( ) const

Get the file data as an 8-bit array.

Returns
8-bit array

Definition at line 42 of file file.cpp.

size_t hx3d::File::getSize ( ) const

Get the file size.

Returns
Size

Definition at line 46 of file file.cpp.

Ptr< File > hx3d::File::loadAsciiFile ( std::string  path)
static

Load an ascii file from a path.

Parameters
pathPath to file
Returns
File handler

Definition at line 52 of file file.cpp.

Ptr< File > hx3d::File::loadBinaryFile ( std::string  path)
static

Load a binary file from a path.

Parameters
pathPath to file
Returns
File handler

Definition at line 62 of file file.cpp.

Ptr< File > hx3d::File::loadInternalAsciiFile ( std::string  path)
static

Load an internal ascii file.

Parameters
pathPath to file
Returns
File handler

Definition at line 72 of file file.cpp.

std::string hx3d::File::toString ( )

Return the file content as a string.

Returns
String

Definition at line 90 of file file.cpp.

void hx3d::File::writeInternalAsciiFile ( std::string  path,
std::string  content 
)
static

Write to an internal ascii file.

Parameters
pathPath to file
contentContent

Definition at line 80 of file file.cpp.


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