
#ifndef BCGlyphBufferDirectFB_h
#define BCGlyphBufferDirectFB_h

#include <font/BIGlyphBuffer.h>
#include <font/BTFontData.h>

namespace BAL {

class BTFontData;

class BCGlyphBufferDirectFB : public BIGlyphBuffer {
    public:
        virtual bool isEmpty() const;
        virtual int size() const;
        virtual void clear();
        virtual GlyphBufferGlyph* glyphs(int from);
        virtual const GlyphBufferGlyph* glyphs(int from) const;
        virtual GlyphBufferAdvance* advances(int from);
        virtual const GlyphBufferAdvance* advances(int from) const;
        virtual const BTFontData* fontDataAt(int index) const;
        virtual FloatSize offsetAt(int index) const;
        virtual void swap(int index1, int index2);
        virtual Glyph glyphAt(int index) const;
        virtual float advanceAt(int index) const;
        virtual void add(Glyph glyph, const BTFontData* font, float width, const FloatSize* offset = 0);
    private:
        Vector<const BTFontData*, 2048> m_fontData;
        Vector<GlyphBufferGlyph, 2048> m_glyphs;
        Vector<GlyphBufferAdvance, 2048> m_advances;
};

} //namespace BAL

#endif //BCGlyphBufferDirectFB_h
