#include <FTLibrary.h>
Public Member Functions | |
const FT_Library * | GetLibrary () const |
FT_Error | Error () const |
~FTLibrary () | |
const FT_Library * | GetLibrary () const |
FT_Error | Error () const |
~FTLibrary () | |
Static Public Member Functions | |
static const FTLibrary & | Instance () |
static const FTLibrary & | Instance () |
Private Member Functions | |
FTLibrary () | |
FTLibrary (const FT_Library &) | |
FTLibrary & | operator= (const FT_Library &) |
bool | Initialise () |
FTLibrary () | |
FTLibrary (const FT_Library &) | |
FTLibrary & | operator= (const FT_Library &) |
bool | Initialise () |
Private Attributes | |
FT_Library * | library |
FT_Error | err |
FT_Library * | library |
This class encapsulates the Freetype Library. This is a singleton class and ensures that only one FT_Library is in existence at any one time. All constructors are private therefore clients cannot create or instantiate this class themselves and must access it's methods via the static FTLibrary::Instance()
function.
Just because this class returns a valid FTLibrary
object doesn't mean that the Freetype Library has been successfully initialised. Clients should check for errors. You can initialse the library AND check for errors using the following code... err = FTLibrary::Instance().Error();
Definition at line 29 of file FTLibrary.h.
FTLibrary::~FTLibrary | ( | ) |
Destructor
Disposes of the Freetype library
Definition at line 11 of file FTLibrary.cxx.
References FT_Done_FreeType(), and library.
FTLibrary::FTLibrary | ( | ) | [private] |
Default constructors.
Made private to stop clients creating there own FTLibrary objects.
Definition at line 31 of file FTLibrary.cxx.
References Initialise().
FTLibrary::FTLibrary | ( | const FT_Library & | ) | [inline, private] |
Definition at line 68 of file FTLibrary.h.
FTLibrary::~FTLibrary | ( | ) |
Destructor
Disposes of the Freetype library
FTLibrary::FTLibrary | ( | ) | [private] |
FTLibrary::FTLibrary | ( | const FT_Library & | ) | [inline, private] |
Definition at line 68 of file FTLibrary.h.
const FTLibrary & FTLibrary::Instance | ( | ) | [static] |
Global acces point to the single FTLibrary object.
FTLibrary
object. Definition at line 4 of file FTLibrary.cxx.
Referenced by FTFace::FTFace().
const FT_Library* FTLibrary::GetLibrary | ( | ) | const [inline] |
Gets a pointer to the native Freetype library.
Definition at line 44 of file FTLibrary.h.
FT_Error FTLibrary::Error | ( | ) | const [inline] |
Queries the library for errors.
Definition at line 51 of file FTLibrary.h.
FTLibrary& FTLibrary::operator= | ( | const FT_Library & | ) | [inline, private] |
Definition at line 69 of file FTLibrary.h.
bool FTLibrary::Initialise | ( | ) | [private] |
Initialises the Freetype library
Even though this function indicates success via the return value, clients can't see this so must check the error codes. This function is only ever called by the default c_stor
true
if the Freetype library was successfully initialised, false
otherwise. Definition at line 39 of file FTLibrary.cxx.
References err, FT_Init_FreeType(), and library.
Referenced by FTLibrary().
static const FTLibrary& FTLibrary::Instance | ( | ) | [static] |
const FT_Library* FTLibrary::GetLibrary | ( | ) | const [inline] |
Gets a pointer to the native Freetype library.
Definition at line 44 of file FTLibrary.h.
FT_Error FTLibrary::Error | ( | ) | const [inline] |
Queries the library for errors.
Definition at line 51 of file FTLibrary.h.
FTLibrary& FTLibrary::operator= | ( | const FT_Library & | ) | [inline, private] |
Definition at line 69 of file FTLibrary.h.
bool FTLibrary::Initialise | ( | ) | [private] |
Initialises the Freetype library
Even though this function indicates success via the return value, clients can't see this so must check the error codes. This function is only ever called by the default c_stor
true
if the Freetype library was successfully initialised, false
otherwise.
FT_Library* FTLibrary::library [private] |
Freetype library handle.
Definition at line 87 of file FTLibrary.h.
Referenced by Initialise(), and ~FTLibrary().
FT_Error FTLibrary::err [private] |
Current error code. Zero means no error.
Definition at line 93 of file FTLibrary.h.
Referenced by Initialise().
FT_Library* FTLibrary::library [private] |
Freetype library handle.
Definition at line 87 of file FTLibrary.h.