diff options
Expanded the content of some project pages
Diffstat (limited to 'source/00_content/pages/projects')
-rw-r--r-- | source/00_content/pages/projects/binary_mapping.md | 31 | ||||
-rw-r--r-- | source/00_content/pages/projects/codepoint_iterator.md | 21 | ||||
-rw-r--r-- | source/00_content/pages/projects/graph_storage.md | 7 | ||||
-rw-r--r-- | source/00_content/pages/projects/scribble.md | 4 | ||||
-rw-r--r-- | source/00_content/pages/projects/simple_parser.md | 5 | ||||
-rw-r--r-- | source/00_content/pages/projects/trie.md | 21 |
6 files changed, 80 insertions, 9 deletions
diff --git a/source/00_content/pages/projects/binary_mapping.md b/source/00_content/pages/projects/binary_mapping.md index c178236..0c1d2ed 100644 --- a/source/00_content/pages/projects/binary_mapping.md +++ b/source/00_content/pages/projects/binary_mapping.md @@ -19,6 +19,33 @@ A explanation of an earlier version of this template library can be found on thi * Unit Tests based on GoogleTest * MIT license -[blog]: /article/mapping-binary-structures-as-tuples-using-template-metaprogramming -[Github]: https://github.com/KnairdA/BinaryMapping +## Usage example + +~~~ +BinaryMapping::Container< + BinaryMapping::Tuple< + BinaryMapping::LittleEndian, + std::uint32_t, + std::int16_t, + BinaryMapping::ByteField<3>, + std::uint8_t + > +> container(10); + +for ( auto&& tuple : container ) { + tuple.set<0>(UINT32_MAX); + tuple.set<1>(INT16_MAX); + tuple.set<2>({1, 2, 3}); + tuple.set<3>(42); +} + +std::uint32_t test = container.at(5).get<0>(); +~~~ +{: .language-cpp} + +The code listed above defines a container of a tuple consisting of a `std::uint32_t`, `std::int16_t`, 3-byte and `std::uint8_t` field with little endianess, instantiates a buffer containing ten instances of this tuple, iterates through all 10 elements, gives them values, transparently converts to the correct endianess and extracts the value of the first field of the fifth tuple contained in the buffer. In short: BinaryMapping is a library that abstracts endianess aware serializing of binary structures into structures, containers and iterators. If you are interested in further details of the usage of all features provided by BinaryMapping don't hesitate to check out the [documentation]. + +[blog]: /article/mapping_binary_structures_as_tuples_using_template_metaprogramming +[Github]: https://github.com/KnairdA/BinaryMapping/ [cgit]: http://code.kummerlaender.eu/BinaryMapping/ +[documentation]: https://github.com/KnairdA/BinaryMapping/blob/master/docs/ diff --git a/source/00_content/pages/projects/codepoint_iterator.md b/source/00_content/pages/projects/codepoint_iterator.md index e202571..6da24ea 100644 --- a/source/00_content/pages/projects/codepoint_iterator.md +++ b/source/00_content/pages/projects/codepoint_iterator.md @@ -4,6 +4,8 @@ The source code is available on both my [Github] profile and [cgit]. +For readers versed in German a [blog article] describing the implementation in a more detailed manner is available. + ## Current features * Bidirectional iteration through unicode codepoints @@ -11,5 +13,24 @@ The source code is available on both my [Github] profile and [cgit]. * Dereferencing an instance of the iterator yields the codepoint as `char32_t` * Unit Tests based on GoogleTest +## Usage example + +While all features of this class are demonstrated by Google-Test based [Unit-Tests] we can see a basic `UTF8::CodepointIterator` usage example in the following code snippet. The [example text] is written in Old Norse runes. + + +~~~ +std::string test(u8"ᛖᚴ ᚷᛖᛏ ᛖᛏᛁ ᚧ ᚷᛚᛖᚱ ᛘᚾ ᚦᛖᛋᛋ ᚨᚧ ᚡᛖ ᚱᚧᚨ ᛋᚨᚱ"); + +for ( UTF8::CodepointIterator iter(test.cbegin()); + iter != test.cend(); + ++iter ) { + std::wcout << static_cast<wchar_t>(*iter); +} +~~~ +{: .language-cpp} + [Github]: https://github.com/KnairdA/CodepointIterator [cgit]: http://code.kummerlaender.eu/CodepointIterator/ +[Unit-Tests]: https://github.com/KnairdA/CodepointIterator/blob/master/test.cc +[example text]: http://www.columbia.edu/~fdc/utf8/ +[blog article]: /article/notizen_zu_cpp_und_unicode diff --git a/source/00_content/pages/projects/graph_storage.md b/source/00_content/pages/projects/graph_storage.md index b7beef8..383eeee 100644 --- a/source/00_content/pages/projects/graph_storage.md +++ b/source/00_content/pages/projects/graph_storage.md @@ -1,12 +1,13 @@ # GraphStorage -…is a Graph storage and query library based on LevelDB. +…is a Graph storage and query library based on Google LevelDB. -It currently supports integer indexed nodes with properties and directed edges with types. The integer IDs are serialized _by hand_, values are serialized using protocol buffers. Everything is stored in a single sorted LevelDB database. +It currently supports integer indexed nodes with properties and directed edges with types. The integer IDs are serialized _by hand_, values are serialized using protocol buffers. Everything is stored in a single sorted [LevelDB] database. Queries are possible trough a iterator like interface that handles single level queries quite fast. Additionally changes to edges can be monitored using a subscription mechanism. The library is in development and while not intended for any kind of production usage the source code is available via both [Github] and [cgit]. -[Github]: https://github.com/KnairdA/GraphStorage +[Github]: https://github.com/KnairdA/GraphStorage/ [cgit]: http://code.kummerlaender.eu/GraphStorage/ +[LevelDB]: https://code.google.com/p/leveldb/ diff --git a/source/00_content/pages/projects/scribble.md b/source/00_content/pages/projects/scribble.md index 7657a0d..acd729d 100644 --- a/source/00_content/pages/projects/scribble.md +++ b/source/00_content/pages/projects/scribble.md @@ -2,7 +2,7 @@ …is a multi-client scribble board using HTML5-Canvas as drawing and socket.io as communication technology. -I developed this application together with [gnuheidix] and as such the source code is available on his [Github] profile. +I developed this application together with [Thomas Heidrich] and as such the source code is available on his [Github] profile. -[gnuheidix]: http://gnuheidix.de/ +[Thomas Heidrich]: http://gnuheidix.de/ [Github]: https://github.com/gnuheidix/pubsub-scribble diff --git a/source/00_content/pages/projects/simple_parser.md b/source/00_content/pages/projects/simple_parser.md index ea4df53..cf4ed3d 100644 --- a/source/00_content/pages/projects/simple_parser.md +++ b/source/00_content/pages/projects/simple_parser.md @@ -2,7 +2,7 @@ …is a simple parser for resolving mathematical terms. -The term is parsed by generating a binary expression tree using the Shunting-Yard algorithm. The implementation itself does not use any external libraries and relies fully on the features provided by the C++ language and the standard library. +The term is parsed by generating a binary expression tree using the [Shunting-Yard] algorithm. The implementation itself does not use any external libraries and relies fully on the features provided by the C++ language and the standard library. This application marks the first steps in C++ I took a couple of years back and is available on [Github] or [cgit]. @@ -14,5 +14,6 @@ This application marks the first steps in C++ I took a couple of years back and * Export of the expression tree as [Graphviz] dot for visualization [Graphviz]: http://www.graphviz.org/ -[Github]: https://github.com/KnairdA/SimpleParser +[Github]: https://github.com/KnairdA/SimpleParser/ [cgit]: http://code.kummerlaender.eu/SimpleParser/ +[Shunting-Yard]: http://en.wikipedia.org/wiki/Shunting-yard_algorithm diff --git a/source/00_content/pages/projects/trie.md b/source/00_content/pages/projects/trie.md index 7b30a3a..11e3463 100644 --- a/source/00_content/pages/projects/trie.md +++ b/source/00_content/pages/projects/trie.md @@ -4,6 +4,8 @@ The implementation may be found on [Github] or [cgit]. +A prefix tree or _Trie_ is a data structure that can be used to store a dynamic set in a manner optimized for retrieving all keys with a specific prefix. While those keys are often plain character strings this template based implementation of the prefix tree data structure allows for usage with different types. + ## Current features * Specializable tree element type @@ -11,5 +13,24 @@ The implementation may be found on [Github] or [cgit]. * Builds on the standard library * Unit tests based on GoogleTest +## Usage example + +The following example demonstrates the usage of the `Trie` class template specialized on a key and value type. While the first is obviously required the second may be ommitted if not required. Further usage examples are available as Google-Test based [test cases]. + +~~~ +Trie<uint8_t, uint8_t> trie; + +trie.add({1, 1, 1, 1}, 42); +trie.add({1, 2, 1, 2}, 43); +trie.add({2, 3, 4, 5}, 44); +trie.add({2, 3, 1, 2}, 45); + +std::cout << trie.get({1, 1, 1, 1}) << std::endl; // true +std::cout << trie.get({1, 1, 1, 1}).get() << std::endl; // 42 +std::cout << trie.get({1, 2}) << std::endl; // false +~~~ +{: .language-cpp} + [Github]: https://github.com/KnairdA/Trie [cgit]: http://code.kummerlaender.eu/Trie/ +[test cases]: https://github.com/KnairdA/Trie/blob/master/test.cc |