aboutsummaryrefslogtreecommitdiff
path: root/src/fstring.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2008-12-12 08:13:34 +0000
committerMike Buland <eichlan@xagasoft.com>2008-12-12 08:13:34 +0000
commit7c8e31fc057859d08610f17f669fdfcaf2fc2956 (patch)
tree2d645e85abab60a40091f3e676fcae78fe477148 /src/fstring.h
parenta36df989b1a603474345d792a1f9bc7d375a59ef (diff)
downloadlibbu++-7c8e31fc057859d08610f17f669fdfcaf2fc2956.tar.gz
libbu++-7c8e31fc057859d08610f17f669fdfcaf2fc2956.tar.bz2
libbu++-7c8e31fc057859d08610f17f669fdfcaf2fc2956.tar.xz
libbu++-7c8e31fc057859d08610f17f669fdfcaf2fc2956.zip
All of those changes I thought I'd already committed. The taf writer handles
binary data much better, actually escaping it properly and not stopping on null. Bu::FString has an iterator, it's actually just a raw datatype, but it may have more function later, so careful assuming that it's a char and using it in any non-iterator like way. Also augmented the taf unit test, and added the Bu::CacheCalc base class, the rest of the simple develpment cycle will happen between here and project hhp.
Diffstat (limited to 'src/fstring.h')
-rw-r--r--src/fstring.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/fstring.h b/src/fstring.h
index 167c055..91251bc 100644
--- a/src/fstring.h
+++ b/src/fstring.h
@@ -916,6 +916,31 @@ namespace Bu
916 } 916 }
917 } 917 }
918 918
919 typedef chr *iterator;
920 typedef const chr *const_iterator;
921
922 iterator begin()
923 {
924 flatten();
925 return pFirst->pData;
926 }
927
928 const_iterator begin() const
929 {
930 flatten();
931 return pFirst->pData;
932 }
933
934 iterator end()
935 {
936 return pFirst->pData+pFirst->nLength;
937 }
938
939 const_iterator end() const
940 {
941 return pFirst->pData+pFirst->nLength;
942 }
943
919 private: 944 private:
920 void flatten() const 945 void flatten() const
921 { 946 {