Claw Logo

This page is available in the following languages : English, Français

Presentation

Claw is a C++ Library Absolutely Wonderful. The story of Claw begins when I wanted to group all the small tools I've made along my studies at the university. The library progress from time to time, when I need a new tool.

Claw wants to be standard compliant and as portable as possible. Of course, because I'm currently the only developer, the task is a little bit difficult and you could have some minor problems. If you experience any problem, please let me know.

Claw doesn't have a particular objective but being useful to anyone.

Click here to see the changes with the previous version.

Download

Select the file(s) matching your distribution and/or operating system.

source code runtime libraries
Debian/Ubuntu
development files
Debian/Ubuntu
Windows installer
Windows XP
Download of older versions is available through sourceforge's website.

Classes

Claw is made of several classes. All of them are documented with Doxygen. Here is a small presentation of these classes.

The documentation of the classes is available online.

Data structures

automaton this class is a basic automaton. The structure allow the automaton to not be determinist.
avl an AVL (Adelson, Velskij, and Landis; the names of the authors) is a binary search tree with the property that the difference between the depths of the left and right subtrees is, at most, 1.
basic_singleton the singleton design pattern.
graph a class implementing a graph structure with adjacent lists implementation.
multi_type_map a kind of map that can support values of  different types associated with the same key.
ordered_set an ordered set is a set, but ordered.
tree a tree of any degree.
trie a trie is a tree-like structure used to store strings (words) with unique representation of common prefixes in memory.

Mathematicalconcepts

box_2d a box in a 2D space is represented by the coordinates of two opposite corners.
coordinate_2d X and Y coordinates.
line_2d a line in a 2D space.
rectangle a rectangle in a 2D space. Same as claw::math::box_2d but represented by its coordinates and size.
vector_2d a vector in a 2D space.

Algorithms

game_state, min_max, alpha_beta classes to easily implement artificial intelligence to two players board games.
scan_events interface for all the events happening in thescan of a graph.
breadth_scan this algorithm does a breadth first scan of a graph.
depth_scan this algorithm does a depth first scan of a graph.
topological_sort this algorithm does a topological sort of an oriented and acyclic graph.
kmp Knuth, Morris and Pratt linear algorithm for pattern finding in strings (not only text).
rle_encoder, rle_decoder classes to help encoding/decoding RLE streams.
lzw_encoder, lzw_decoder classes to help encoding/decoding LZW (Lempel, Ziv, Welch) streams.

Graphism

color_palette a class that manage the color palette in palettized images.
bitmap a simple class for reading and writing bitmap files (24 bpp only for writing).
image base class for 32 bpp image manipulation.
jpeg a class for reading and writing jpeg files. This class uses the jpeglib.
pcx a simple class for reading and writing pcx files (24 bpp only for writing).
png a class for reading and writing png files. This class uses libpng.
targa a class for reading and writing Targa files (32 bpp only for writing).
xbm a simple class for reading and writing xbm files.

Tools

Iterators

it_index a class to manage an index (integer) and an iterator easily.
wrapped_iterator an iterator that applies a function on each pointed element. The function must return a reference on the element. For example, combined with claw::pair_first, it allows to iterate through the keys of a std::map.

Functors

binary_true a binary functor returning true.
clone function object that clones a pointer.
delete_function function object that deletes a pointer.
dereference function object that dereferences a pointer.
pair_first, pair_second, first, second these class are functors returning the first (or second) member of a std::pair (useful when you need to get the keys of a std::map).
unary_compose function object that composes two function objects.
unary_true a unary functor returning true.

Application

application this class should help you to define the main class of your application and to deal with command line parameters.
arguments_table a class to manage the arguments of your program, with automatic management of short/long arguments and help message.
arguments if you don't want to use the class claw::application, you can always use this one to deal with the arguments passed to your program.
dynamic_library this class allow to dynamically load a library and to get a function pointer on its symbols.

Meta-programming

if_then_else conditional type declaration.
same_type test if two types are the same.
type_list a list of types.
type_list_find check if a type is in a given type_list.
type_list_is_a_set test if a each type in a type_list is present only once.

System

config_file a class allowing to load informations from a configuration file (like .ini under Windows).
system_info a class to get informations about the system or the user.

Miscellanious

exception a standard compliant exception class that allow you to pass a descriptive string at the constructor.
logger this class can help you to trace your program, with different levels of log.
non_copyable inherit from this class if you don't want your class to be copyable.
smart_ptr a smart pointer class, with reference count.

Streams

bit_istream, bit_ostream two classes to help reading and writing custom bit-length data.
buffered_istream, buffered_ostream these classes are made to help reading and writing in streams with a buffer.

Network

isocket_stream, osocket_stream, socket_stream implementation of the Unix sockets, to be used like any stream of the standard C++ library.
socket_server a class to easily open a socket and create claw::net::socketstreams from incoming connections.

Functions

Strings

trim_left, trim_right, trim remove spaces (or any set of characters) at the left/right/both sides of a string.
squeeze group successive identic characters in a string, from a given set of characters.
is_of_type tell if a string contains data of a given type.

License

Claw is licensed under the GNU Lesser General Public License (LGPL), version 2.1. Among other things, the license allow you a full access to the source code and allow you to use the library even if your program is not free. A copy of the license is included in the package, but you can also access to through this link.

Contact

If you have any question, you can send me a mail and I'll try to answer as soon as possible.

If you have any comment, you can also send me a mail.

If you want to help, you can send me a mail explaining how do you think you can help.

immobilier vente
SourceForge.net Logo Valid HTML 4.01 Transitional