lib/bufferized_ropes: Added module bufferized_ropes to lib.
authorLucas Bajolet <r4pass@hotmail.com>
Mon, 23 Jun 2014 15:18:45 +0000 (11:18 -0400)
committerLucas Bajolet <r4pass@hotmail.com>
Thu, 24 Jul 2014 14:05:02 +0000 (10:05 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

lib/bufferized_ropes.nit [new file with mode: 0644]

diff --git a/lib/bufferized_ropes.nit b/lib/bufferized_ropes.nit
new file mode 100644 (file)
index 0000000..0dac054
--- /dev/null
@@ -0,0 +1,28 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# This file is free software, which comes along with NIT.  This software is
+# distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+# without  even  the implied warranty of  MERCHANTABILITY or  FITNESS FOR A
+# PARTICULAR PURPOSE.  You can modify it if you want,  provided this header
+# is kept unaltered, and a notification of the changes is added.
+# You  are  allowed  to  redistribute it and sell it, alone or as a part of
+# another product.
+
+# Introduces ropes with buffered leaves
+module bufferized_ropes
+
+import standard
+intrude import standard::ropes
+
+# Leaf containing a FlatBuffer to optimize concatenation operations
+private class BufferLeaf
+       super Leaf
+
+       init(val: FlatBuffer) do
+               self.str = val
+               length = str.length
+       end
+
+end
+
+