Revision:
1:578d6bbe9f09
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/WriterEmbedded.h	Fri Dec 16 07:14:05 2011 +0000
@@ -0,0 +1,39 @@
+#ifndef WRITER_EMBEDDED_H
+#define WRITER_EMBEDDED_H
+
+#include "stdint.h"
+#include "WriterBase.h"
+#include "RingBuffer.h"
+
+namespace olc {
+  
+/**
+ *   write ol commands to a bytestring. 
+ **/
+
+template <class T>
+class WriterEmbedded : public WriterBase {
+
+public:
+  WriterEmbedded(T& aBuffer) : mBuffer(aBuffer) {
+  };
+  inline int size() 
+  { 
+    return mBuffer.size(); 
+  };
+  inline int spaceLeft()
+  {
+    return mBuffer.capacityLeft();
+  };
+
+  
+  protected:
+  T& mBuffer;
+  void put(uint8_t aValue) { 
+    mBuffer.pushBack(aValue);  
+  };  
+};
+
+} // end namespace ol
+
+#endif // WRITER_BASE_H