Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
Loading...
Searching...
No Matches
PNGFile Class Reference

Wrapper around File for PNG files. More...

#include <file.h>

Inheritance diagram for PNGFile:
File

Public Member Functions

 PNGFile ()
 Construct a new PNGFile object.
 
 PNGFile (std::string path)
 Construct a new PNGFile object.
 
 ~PNGFile ()
 Destroy the PNGFile object.
 
unsigned int getWidth () const
 Get the Width of the file.
 
unsigned int getHeight () const
 Get the Height of the file.
 
const std::string & getBase64String () const
 Get the Base64 representation of the file.
 
- Public Member Functions inherited from File
 File ()
 Constructs a new File object.
 
 File (std::string path)
 Construct a new File object.
 
 ~File ()
 Destroy the File object.
 
bool load ()
 Loads the data of the file into ram.
 
const std::string & getPath () const
 Get the Path object.
 
const chargetPointer () const
 Get the pointer to the data.
 
int getSize () const
 Get the size of the file stored.
 

Detailed Description

Wrapper around File for PNG files.

Constructor & Destructor Documentation

◆ PNGFile() [1/2]

PNGFile::PNGFile ( )

Construct a new PNGFile object.

Constructs an empty file object, really just used for the config or placeholder objects.

◆ PNGFile() [2/2]

PNGFile::PNGFile ( std::string path)

Construct a new PNGFile object.

Internally calls File::load(), then does few calculations for loading data used in the server.

Parameters
pathThe Path of the file

Member Function Documentation

◆ getBase64String()

const std::string & PNGFile::getBase64String ( ) const

Get the Base64 representation of the file.

Returns
const std::string& the base64 representation

◆ getHeight()

unsigned int PNGFile::getHeight ( ) const

Get the Height of the file.

Returns
unsigned int the height

◆ getWidth()

unsigned int PNGFile::getWidth ( ) const

Get the Width of the file.

Returns
unsigned int the width

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