CrissCross

From IO.IN Research

Jump to: navigation, search
This article was written by Tycho.
A CrissCross v0.7.0 CPUID test application.
A CrissCross v0.7.0 CPUID test application.

CrissCross is a C++ application framework for Windows, Linux, FreeBSD, OpenBSD, NetBSD, and Mac OS X. It is licensed under the New BSD License. CrissCross has pages on Google Code, SourceForge and freshmeat.net.

Features

CrissCross provides several classes to make writing applications much simpler.

  • CoreIOReader: For basic input operations. Abstract class.
  • CoreIOWriter: For basic output operations. Abstract class.
  • Console: Console I/O operations. Inherits CoreIOReader and CoreIOWriter.
  • CPUID: Can identify various CPU properties and features.
  • Mutex: Allows for safe threaded operations. Used in CoreIO.
  • HeapSort: Can sort arrays very quickly.
  • ShellSort: Another excellent sorting algorithm.
  • InsertionSort: Another excellent sorting algorithm.
  • BubbleSort: A very slow sort, included for educational purposes.
  • CombSort: Approximately 12 lines different from BubbleSort, but exponentially faster. Not intended for production use.
  • QuickSort: Can sort arrays with acceptable speeds (deprecated for speed when concerning large datasets and reverse-sorted input data).
  • LList: A fast doubly-linked list implementation.
  • DArray: A fast dynamically-sized array.
  • DStack: A fast dynamically-sized stack.
  • RedBlackTree: A very fast self-balancing tree structure.
  • AVLTree: Another very fast self-balancing tree structure.
  • SplayTree: A fast tree structure with interesting properties.
  • Stopwatch: A high-precision timing class, generally used for code profiling.
  • FileReader: Generic file reader. Inherits CoreIO.
  • FileWriter: Generic file writer. Inherits CoreIO.
  • MD2Hash: MD2 hash generator. Deprecated due to speed issues on 32-bit (and above) machines.
  • MD4Hash: MD4 hash generator. Deprecated due to theoretical insecurity.
  • MD5Hash: MD5 hash generator.
  • SHA1Hash: SHA-1 hash generator. Deprecated due to theoretical insecurity.
  • SHA256Hash: SHA-256 hash generator.
  • SHA512Hash: SHA-512 hash generator.
  • TigerHash: TigerHash hash generator.
  • CoreSocket: Abstract socket class.
  • TCPSocket: TCP socket class.
  • UDPSocket: UDP socket class.
  • And more to come...

Source Code

The source code can be obtained via the Subversion repository on Google Code. The trunk code can be checked out here:

svn checkout http://crisscross.googlecode.com/svn/trunk/ crisscross

Once you've finished your checkout process, you can then compile the code.

$cd crisscross
$make -j2 check

Once the compile finishes (takes 13 seconds on a 4x 3.0GHz Intel Xeon processor with GCC 4.1.2), it will automatically run a test application (provided you've specified 'make check'). If CrissCross passes all the tests, the code tree you have can be considered tentatively stable for general use. If it fails any of the tests, please report the entire output to the CrissCross Google Group. Any failure may be a bug in the library.

Personal tools