From 609be30bf9562a86182ed0958a238b6ba9392ebf Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Sat, 5 Oct 2013 12:55:57 +0200 Subject: Added Makefile, Readme and MIT license --- LICENSE | 20 ++++++++++++++++++++ Makefile | 24 ++++++++++++++++++++++++ README.md | 14 ++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 README.md 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 -- cgit v1.2.3