FTLibrary Class Reference

#include <FTLibrary.h>

List of all members.

Public Member Functions

const FT_LibraryGetLibrary () const
FT_Error Error () const
 ~FTLibrary ()
const FT_LibraryGetLibrary () const
FT_Error Error () const
 ~FTLibrary ()

Static Public Member Functions

static const FTLibraryInstance ()
static const FTLibraryInstance ()

Private Member Functions

 FTLibrary ()
 FTLibrary (const FT_Library &)
FTLibraryoperator= (const FT_Library &)
bool Initialise ()
 FTLibrary ()
 FTLibrary (const FT_Library &)
FTLibraryoperator= (const FT_Library &)
bool Initialise ()

Private Attributes

FT_Librarylibrary
FT_Error err
FT_Librarylibrary


Detailed Description

FTLibrary class is the global accessor for the Freetype 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();

See also:
"Freetype 2 Documentation"

Definition at line 29 of file FTLibrary.h.


Constructor & Destructor Documentation

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]

Default constructors.

Made private to stop clients creating there own FTLibrary objects.

FTLibrary::FTLibrary ( const FT_Library  )  [inline, private]

Definition at line 68 of file FTLibrary.h.


Member Function Documentation

const FTLibrary & FTLibrary::Instance (  )  [static]

Global acces point to the single FTLibrary object.

Returns:
The global 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.

Returns:
A handle to a FreeType library instance.

Definition at line 44 of file FTLibrary.h.

FT_Error FTLibrary::Error (  )  const [inline]

Queries the library for errors.

Returns:
The current error code.

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

Returns:
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]

Global acces point to the single FTLibrary object.

Returns:
The global FTLibrary object.

const FT_Library* FTLibrary::GetLibrary (  )  const [inline]

Gets a pointer to the native Freetype library.

Returns:
A handle to a FreeType library instance.

Definition at line 44 of file FTLibrary.h.

FT_Error FTLibrary::Error (  )  const [inline]

Queries the library for errors.

Returns:
The current error code.

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

Returns:
true if the Freetype library was successfully initialised, false otherwise.


Member Data Documentation

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.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:25:33 2011 for ROOT_528-00b_version by  doxygen 1.5.1