Path: blob/master/thirdparty/graphite/src/inc/CmapCache.h
9906 views
// SPDX-License-Identifier: MIT OR MPL-2.0 OR LGPL-2.1-or-later OR GPL-2.0-or-later1// Copyright 2010, SIL International, All rights reserved.23#pragma once45#include "inc/Main.h"6#include "inc/Face.h"78namespace graphite2 {910class Face;1112class Cmap13{14public:1516virtual ~Cmap() throw() {}1718virtual uint16 operator [] (const uint32) const throw() { return 0; }1920virtual operator bool () const throw() { return false; }2122CLASS_NEW_DELETE;23};2425class DirectCmap : public Cmap26{27DirectCmap(const DirectCmap &);28DirectCmap & operator = (const DirectCmap &);2930public:31DirectCmap(const Face &);32virtual uint16 operator [] (const uint32 usv) const throw();33virtual operator bool () const throw();3435CLASS_NEW_DELETE;36private:37const Face::Table _cmap;38const void * _smp,39* _bmp;40};4142class CachedCmap : public Cmap43{44CachedCmap(const CachedCmap &);45CachedCmap & operator = (const CachedCmap &);4647public:48CachedCmap(const Face &);49virtual ~CachedCmap() throw();50virtual uint16 operator [] (const uint32 usv) const throw();51virtual operator bool () const throw();52CLASS_NEW_DELETE;53private:54bool m_isBmpOnly;55uint16 ** m_blocks;56};5758} // namespace graphite2596061