X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglprint.h;h=c23fbc3e794c38b81428ba5719d825f8bce3af64;hb=a832996c884a0e0acc9a38ba4dd258edb75ec7af;hp=64a34559b76866b6bde921f87836ca753ec4dc65;hpb=8a1580721a939c3edea2ce1b342148e94ad2b814;p=gldbg.git diff --git a/source/glprint.h b/source/glprint.h index 64a3455..c23fbc3 100644 --- a/source/glprint.h +++ b/source/glprint.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of gldbg -Copyright © 2009 Mikko Rasa, Mikkosoft Productions -Distributed under the GPL -*/ - #ifndef GLPRINT_H_ #define GLPRINT_H_ @@ -19,6 +12,19 @@ char *glprint_get_buffer(GlDecoder *); #ifdef __cplusplus } + +class GlPrint +{ +private: + GlDecoder *glp; + +public: + GlPrint(char *b, unsigned l): glp(glprint_new(b, l)) { } + ~GlPrint() { gldecoder_delete(glp); } + + int decode(const char *d, unsigned l) { return gldecoder_decode(glp, d, l); } + char *get_buffer() { return glprint_get_buffer(glp); } +}; #endif #endif