]> git.tdb.fi Git - gldbg.git/blobdiff - source/glprint.h
Replace per-file license notices with License.txt
[gldbg.git] / source / glprint.h
index 64a34559b76866b6bde921f87836ca753ec4dc65..c23fbc3e794c38b81428ba5719d825f8bce3af64 100644 (file)
@@ -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