What is CrissCross?
CrissCross is a C++ application framework. Basically, it provides a few cross-platform
classes which allow you to do things without need to change your code between platforms.
Is there documentation available?
The latest Doxygen-generated documentation has been made available here.
Where can I get it?
The latest release-quality code is here.
The current testing-quality code is on the subversion repository on Google Code.
You can get the trunk code from SVN like so:
svn checkout http://crisscross.googlecode.com/svn/trunk/ crisscross
What functionality does it provide?
To give you an idea, here are a few of the classes we've got so far:
- AVLTree: A fast AVL tree implementation.
- BubbleSort: A very slow sorting algorithm (provided for educational purposes). Inherits Sorter.
- CombSort: A sorting algorithm based on BubbleSort but many magnitudes faster. Inherits Sorter.
- Console: Console I/O operations. Inherits CoreIOReader and CoreIOWriter.
- CoreIOReader: For basic input operations. Abstract class.
- CoreIOWriter: For basic output operations. Abstract class.
- CoreSocket: For basic socket I/O operations. Abstract class.
- CPUID: Can identify various CPU properties and features.
- DArray: A fast, dynamically sized array.
- DStack: A fast and small dynamically sized stack.
- FileReader: Text and binary file reader. Inherits CoreIOReader.
- FileWriter: Text and binary file writer. Inherits CoreIOWriter.
- HashTable: A simple hash table.
- HeapSort: A fast sorting algorithm. Inherits Sorter.
- InsertionSort: A very slow sorting algorithm (provided for educational purposes). Inherits Sorter.
- LList: A faster-than-most doubly linked list.
- MD2Hash: An MD2 hash generator.
- MD4Hash: An MD4 hash generator.
- MD5Hash: An MD5 hash generator.
- Mutex: Allows for safe threaded operations. Used in CoreIOReader and CoreIOWriter.
- QuickSort: A slow algorithm (in C++ anyway), provvided for educational purposes. Inherits Sorter.
- RedBlackTree: A very fast red-black tree implementation.
- SHA1Hash: A SHA-1 hash generator.
- SHA256Hash: A SHA-256 hash generator.
- SHA512Hash: A SHA-512 hash generator.
- ShellSort: A fast sorting algorithm. Inherits Sorter.
- Sorter: An abstract class for sorting algorithms.
- SplayTree: A fast splay tree implementation.
- Stopwatch: A high-precision timer designed for profiling code.
- TCPSocket: Used for TCP/IP communications. Inherits CoreSocket.
- TigerHash: A Tiger hash generator.
- UDPSocket: Used for UDP/IP communications. Inherits CoreSocket.
- And more to come...
Can you provide source code for a sample application?
The releases and SVN code of CrissCross contain several examples showing how CrissCross can be used to
write small, efficient applications. You can find such examples in the 'examples' directory. Examples
in the v0.7.0 release include:
- CPUID: A demonstration of how to read from and output CPUID information using the CPUID class.
- CheckMark: A checksum algorithm benchmark.
- EmptyProject: As its name suggests, it's just an empty project showing the basis for a
CrissCross application.
- GenPrime: A fairly fast prime number discovery algorithm. Useful for demonstrating the penalty of
branch mispredictions in Intel processors (especially the Pentium 4). On the Ferrous Moon wiki,
GenPrime is used as an optimization
testbed and training tool.
- MemoryProfile: Simply prints out the memory usage of various data structures (useful to prepare
for an embedded system build such as one for the Nintendo DS where resources are limited).
- SortBenchmark: Demonstrates the speed and relative efficiency of the various sorting algorithms
that CrissCross provides.
How about CPUID? Can I see that in action?
Yes. Here is version 0.6.0 of CrissCross CPUID running in a Gnome terminal under Gentoo Linux. The example below also shows Console::SetColour() in action as well.

Click thumbnail for a larger image.
And here's the same CPUID program running with CrissCross v0.6.0 under Windows XP.

Click thumbnail for a larger image.