aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerländer2013-10-05 12:55:57 +0200
committerAdrian Kummerländer2013-10-05 12:55:57 +0200
commit609be30bf9562a86182ed0958a238b6ba9392ebf (patch)
tree11e32d547489994ebd00118f7baf3bf1c486c5df
parent4d1b9a918f8a189ba1e9887c6a9da04e7392db90 (diff)
downloadCodepointIterator-609be30bf9562a86182ed0958a238b6ba9392ebf.tar
CodepointIterator-609be30bf9562a86182ed0958a238b6ba9392ebf.tar.gz
CodepointIterator-609be30bf9562a86182ed0958a238b6ba9392ebf.tar.bz2
CodepointIterator-609be30bf9562a86182ed0958a238b6ba9392ebf.tar.lz
CodepointIterator-609be30bf9562a86182ed0958a238b6ba9392ebf.tar.xz
CodepointIterator-609be30bf9562a86182ed0958a238b6ba9392ebf.tar.zst
CodepointIterator-609be30bf9562a86182ed0958a238b6ba9392ebf.zip
Added Makefile, Readme and MIT license
-rw-r--r--LICENSE20
-rw-r--r--Makefile24
-rw-r--r--README.md14
3 files changed, 58 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8ca4468
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 Adrian Kummerländer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1c9b781
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+CXX = g++
+CXXFLAGS = -std=c++11 -W -Wall -Wextra -pedantic
+
+SRC = src/codepoint_iterator.cc \
+ test.cc
+OBJ = $(subst .cc,.o,$(SRC))
+
+all: test
+
+test: ${OBJ}
+ $(CXX) -o test -lgtest $(OBJ)
+ ./test
+
+.PHONY: clean;
+clean:
+ rm -f $(OBJ)
+ rm test
+
+depend: .depend
+
+.depend: $(SRC)
+ $(CXX) -M $(CXXFLAGS) $< > $@
+
+include .depend
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..fd731ec
--- /dev/null
+++ b/README.md
@@ -0,0 +1,14 @@
+# CodepointIterator
+
+... is a `std::iterator` derived class implementing the `std::bidirectional_iterator_tag` which iterates through unicode codepoints in a UTF8-encoded string.
+
+## Current features:
+
+- Bidirectional iteration through unicode codepoints
+- The class itself does not rely on any external libraries
+- Dereferencing an instance of the iterator yields the codepoint as `char32_t`
+- Unit Tests based on GoogleTest
+
+## Requirements:
+
+- [GoogleTest](http://code.google.com/p/googletest/) for tests