0030675: Visualization - remove redundant proxy classes in hierarchy of PrsMgr_Presen...
[occt.git] / src / Font / Font_FTLibrary.hxx
CommitLineData
a174a3c5 1// Created on: 2013-01-28
2// Created by: Kirill GAVRILOV
d5f74e42 3// Copyright (c) 2013-2014 OPEN CASCADE SAS
a174a3c5 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
a174a3c5 6//
d5f74e42 7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
a174a3c5 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
a174a3c5 15
16#ifndef _Font_FTLibrary_H__
17#define _Font_FTLibrary_H__
18
ec357c5c 19#include <Standard_Type.hxx>
a174a3c5 20#include <Standard_Transient.hxx>
a174a3c5 21
f9801cf9 22// forward declarations to avoid including of FreeType headers
23typedef struct FT_LibraryRec_ *FT_Library;
a174a3c5 24
25//! Wrapper over FT_Library. Provides access to FreeType library.
26class Font_FTLibrary : public Standard_Transient
27{
28
29public:
30
31 //! Initialize new FT_Library instance.
32 Standard_EXPORT Font_FTLibrary();
33
34 //! Release FT_Library instance.
35 Standard_EXPORT ~Font_FTLibrary();
36
37 //! This method should always return true.
38 //! @return true if FT_Library instance is valid.
39 bool IsValid() const
40 {
41 return myFTLib != NULL;
42 }
43
44 //! Access FT_Library instance.
45 FT_Library Instance() const
46 {
47 return myFTLib;
48 }
49
50private:
51
52 FT_Library myFTLib;
53
54private:
55
56 Font_FTLibrary (const Font_FTLibrary& );
57 Font_FTLibrary& operator= (const Font_FTLibrary& );
58
59public:
60
92efcf78 61 DEFINE_STANDARD_RTTIEXT(Font_FTLibrary,Standard_Transient) // Type definition
a174a3c5 62
63};
64
65DEFINE_STANDARD_HANDLE(Font_FTLibrary, Standard_Transient)
66
67#endif // _Font_FTLibrary_H__