Claw  1.7.3
Namespaces | Classes | Typedefs | Functions | Variables
claw Namespace Reference

This is the main namespace. More...

Namespaces

namespace  ai
 Everything about artificial intelligence.
namespace  graphic
 Everything about image structures and processing.
namespace  math
 Manipulation of mathematic, geometric, etc. items.
namespace  memory
 Memory management.
namespace  meta
 Structures for meta-programmation.
namespace  net
 Network communications.
namespace  pattern
 Here are the design patterns.
namespace  text
 Everything about text processing.
namespace  tween
 Tweeners interpolate the intermediate values between two given reference values using various equations.

Classes

class  application
 A class to represent the application. More...
class  arguments
 A class to manage the arguments of your program. More...
class  arguments_table
 A class to manage the arguments of your program, with automatic management of short/long arguments and help message. More...
class  automaton
 Basic automaton structure. More...
class  avl
 Binary search tree AVL implementation. More...
class  avl_base
 Binary search tree base AVL implementation. More...
class  binary_node
 Basic binary node. More...
class  bit_istream
 This class is made to help reading datas of custom bit length. More...
class  bit_ostream
 This class is made to help writing datas of custom bit length. More...
class  buffered_istream
 This class is made to help reading istreams with a buffer. More...
class  buffered_ostream
 This class is made to help writing in ostreams with a buffer. More...
class  configuration_file
 A class to get the content of a configuration file. More...
class  dynamic_library
 A class to use dynamic libraries. More...
class  dynamic_library_traits_unix
 Unix interface for using dynamic libraries. More...
class  dynamic_library_traits_win32
 Microsoft Windows interface for using dynamic libraries. More...
class  exception
 A simple class to use as exception with string message. More...
class  bad_format
 Exception thrown when accessing bad formated data. More...
class  first
 Fuction object to get the first element of a std::pair. More...
class  const_first
 Fuction object to get the first element of a std::pair. More...
class  pair_first
 Fuction object to get the first element of a std::pair. More...
class  const_pair_first
 Fuction object to get the first element of a std::pair. More...
class  second
 Fuction object to get the second element of a std::pair. More...
class  const_second
 Fuction object to get the second element of a std::pair. More...
class  pair_second
 Fuction object to get the second element of a std::pair. More...
class  const_pair_second
 Fuction object to get the second element of a std::pair. More...
class  unary_true
 Always true unary predicate. More...
class  binary_true
 Always true binary predicate. More...
class  unary_compose
 Function object that compose two function objects. More...
class  delete_function
 Function object that deletes a pointer. More...
class  clone
 Function object that clones a pointer. More...
class  dereference
 Function object that dereferences a pointer. More...
class  const_dereference
 Function object that dereferences a constant pointer. More...
class  graph_exception
 The exceptions thrown by the graphs. More...
class  graph
 A class to represent a graph. More...
class  scan_events
 Different stages of graph scanning. More...
class  breadth_scan
 This class performs a depth scan of a graph. Only reachables vertices from a given vertex are proceeded. More...
class  depth_scan
 This class performs a depth scan of a graph. All nodes are proceeded. More...
class  topological_sort
 Pass this class as the "Envents" template parameter of the depth scan class to sort the vertices of a graph with the topological sort algorithm. More...
class  multi_type_map_wrapper< Head, multi_type_map< Key, meta::type_list< Head, Tail > > >
class  multi_type_map_wrapper< ValueType, multi_type_map< Key, meta::type_list< Head, Tail > > >
class  multi_type_map_helper< multi_type_map< Key, meta::type_list< Head, Tail > > >
class  multi_type_map_helper< multi_type_map< Key, claw::meta::no_type > >
class  multi_type_map_visitor_process
 This class goes through all entries of a given type in a multi_type_map and apply a function to them. More...
class  multi_type_map_visitor_rec< Key, claw::meta::no_type >
 Specialization of multi_type_map_visitor_rec for an empty type list. More...
class  multi_type_map_visitor_rec< KeyType, claw::meta::type_list< HeadType, TailType > >
 Specialization of multi_type_map_visitor_rec for a non empty type list. More...
class  it_index
 A class to manage an index and an iterator easily. More...
class  wrapped_iterator_by_category
 Base class for wrapped iterators. More...
class  wrapped_iterator_by_category< std::forward_iterator_tag, Value, Iterator, Function >
 Base class for wrapped iterators, specialized for forward iterators. More...
class  wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >
 Base class for wrapped iterators, specialized for bidirectional iterators. More...
class  wrapped_iterator_by_category< std::random_access_iterator_tag, Value, Iterator, Function >
 Base class for wrapped iterators, specialized for random iterators. More...
class  wrapped_iterator
 This class defines an iterator resulting of the appliance of a function to an effective iterator. More...
class  log_level
 Set the level of the next message for logger_system::operator<<(). More...
class  log_stream
 Base class for streams accepting log output. More...
class  console_logger
 This class write log messages in std::clog. More...
class  file_logger
 This class write log messages in a file. More...
class  log_stream_concise
 A log stream that does not output a message that have been recently output. More...
class  log_stream_uniq
 A log stream that does not output successively the same message. More...
class  log_system
 A class implementing a logging system. More...
class  lzw_decoder
 A class to help decoding a stream encoded with Lempel-Ziv-Welch (LZW) compression algorithm. More...
class  lzw_encoder
 A class to help encoding a stream with Lempel-Ziv-Welch (LZW) compression algorithm. More...
class  max_vector
 Fill a container with some values, keeping only all the "maximum" inserted values. More...
class  multi_type_map< Key, meta::no_type >
 Partial specialization, to stop the inheritance recursivity. More...
class  multi_type_map< Key, meta::type_list< Head, Tail > >
 This class can associate values of different types to a key. More...
class  multi_type_map_visitor
 This class goes through all entries in a multi_type_map and apply a function to them. More...
struct  make_epsilon
 This class generates an epsilon value of a given precision. More...
class  real_number
 Custom precision real numbers. More...
class  rle_decoder
 A class to help decoding run-length encoded (RLE) streams. More...
class  rle_encoder
 A class to help run-length encoding (RLE) streams. More...
class  socket_traits_unix
 Unix interface for using sockets. More...
class  socket_traits_win32
 Win32 interface for using sockets. More...
class  system_info
 A class to get some informations about the system in which your program runs. More...
class  tree
 A tree structure with any number of children. More...
class  trie
 This class is a trie tree. More...
struct  find_type_by_size
 This meta class finds, in a list of types, the first type stored exactly with a given number of bits. More...
struct  find_type_by_size< Size, meta::no_type >
 End of the recursion of the find_type_by_size class. More...
struct  integer_of_size
 Define the type of a signed integer stored with a given number of bits. Template parameters. More...
struct  unsigned_integer_of_size
 Define the type of an unsigned integer stored with a given number of bits. Template parameters. More...
class  dynamic_library_traits
 Common interface for platform specific methods needed for using dynamic library. More...

Typedefs

typedef dynamic_library_traits_unix dynamic_library_traits
 The traits to access the dynamic libraries in Unix system.
typedef socket_traits_unix socket_traits
typedef meta::no_type non_standard_signed_types
typedef meta::no_type non_standard_unsigned_types
typedef meta::type_list
< signed char, meta::type_list
< signed short,
meta::type_list< signed int,
non_standard_signed_types > > > 
signed_integers
 This is the list of c++ signed integer types.
typedef meta::type_list
< unsigned char,
meta::type_list< unsigned
short, meta::type_list
< unsigned int,
non_standard_unsigned_types > > > 
unsigned_integers
 This is the list of c++ unsigned integer types.
typedef
unsigned_integer_of_size
< 8 >::type 
u_int_8
 An unsigned integer on 8 bits.
typedef
unsigned_integer_of_size
< 16 >::type 
u_int_16
 An unsigned integer on 16 bits.
typedef
unsigned_integer_of_size
< 32 >::type 
u_int_32
 An unsigned integer on 32 bits.
typedef integer_of_size< 8 >::type int_8
 An integer on 8 bits.
typedef integer_of_size< 16 >::type int_16
 An integer on 16 bits.
typedef integer_of_size< 32 >::type int_32
 An integer on 32 bits.

Functions

template<typename InputIterator , typename UnaryFunction >
UnaryFunction inplace_for_each (InputIterator first, InputIterator last, UnaryFunction f)
 Apply an unary function to all members of a sequence.
template<typename ForwardIterator1 , typename ForwardIterator2 >
ForwardIterator1 find_first_not_of (ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2)
 Find the position in a range of the first element not in the elements of a given range.
template<typename ForwardIterator1 , typename ForwardIterator2 , typename ForwardIterator3 >
std::size_t replace (ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 e1_first, ForwardIterator2 e1_last, ForwardIterator3 e2_first, ForwardIterator3 e2_last)
 Replace a set of elements in a range by other elements.
void debug_assert (const char *file, const char *func, unsigned int line, bool b, const std::string &s)
 The method used by CLAW_ASSERT macro. Souldn't be used elsewhere.
template<typename InputIterator1 , typename InputIterator2 >
bool glob_match (InputIterator1 pattern_first, InputIterator1 pattern_last, InputIterator2 first, InputIterator2 last, typename InputIterator1::value_type any_sequence, typename InputIterator1::value_type zero_or_one, typename InputIterator1::value_type any)
 Check if a sequence matches a given pattern.
template<typename InputIterator1 , typename InputIterator2 >
bool glob_potential_match (InputIterator1 pattern_first, InputIterator1 pattern_last, InputIterator2 first, InputIterator2 last, typename InputIterator1::value_type any_sequence, typename InputIterator1::value_type zero_or_one, typename InputIterator1::value_type any)
 Check if a sequence may match a given pattern.
template<typename Value , typename Iterator , typename Function >
wrapped_iterator_by_category
< std::random_access_iterator_tag,
Value, Iterator, Function > 
operator+ (int n, const wrapped_iterator_by_category< std::random_access_iterator_tag, Value, Iterator, Function > &it)
template<typename Value , typename Iterator , typename Function >
wrapped_iterator_by_category
< std::random_access_iterator_tag,
Value, Iterator, Function > 
operator- (int n, const wrapped_iterator_by_category< std::random_access_iterator_tag, Value, Iterator, Function > &it)
CLAW_LOGGER_EXPORT log_systemlendl (log_system &log)
 Add a new line caracter to a logger and flush it.

Variables

log_level log_error (0,"error: ")
 Use this level if something goes really bad and your application may crash.
log_level log_warning (1,"warning: ")
 Use this level if a small problem occurs and you can deal with it without crashing the application.
log_level log_verbose (15)
 Use this level if you want to inform the user about a situation that is not problematic.
log_system logger
 The default log system provided by claw.

Detailed Description

This is the main namespace.

Function Documentation

void claw::debug_assert ( const char *  file,
const char *  func,
unsigned int  line,
bool  b,
const std::string &  s 
)
inline

The method used by CLAW_ASSERT macro. Souldn't be used elsewhere.

Parameters
fileThe file where the error is produced.
funcThe name of the current function.
lineThe line where the error is produced.
bA boolean condition to verify.
sMessage printed if b is not verified.

Definition at line 73 of file assert.hpp.

template<typename ForwardIterator1 , typename ForwardIterator2 >
ForwardIterator1 claw::find_first_not_of ( ForwardIterator1  first1,
ForwardIterator1  last1,
ForwardIterator2  first2,
ForwardIterator2  last2 
)

Find the position in a range of the first element not in the elements of a given range.

Parameters
first1Iterator on the first element of the sequence in which we search.
last1Iterator just past the end of the sequence in which we search.
first2Iterator on the first element of the range of the elements to skip.
last2Iterator just past the end of the range of the elements to skip.

Definition at line 69 of file algorithm.tpp.

Referenced by claw::text::c_escape().

template<typename InputIterator1 , typename InputIterator2 >
bool claw::glob_match ( InputIterator1  pattern_first,
InputIterator1  pattern_last,
InputIterator2  first,
InputIterator2  last,
typename InputIterator1::value_type  any_sequence,
typename InputIterator1::value_type  zero_or_one,
typename InputIterator1::value_type  any 
)

Check if a sequence matches a given pattern.

Parameters
pattern_firstIterator on the beginning of the pattern.
pattern_lastIterator just past the end of the pattern.
firstIterator on the beginning of the sequence.
lastIterator just last the end of the sequence.
any_sequenceA value representing any sequence of values, empty or not.
zero_or_oneA value representing any value or no value.
anyA value representing any value.

Definition at line 45 of file glob.tpp.

Referenced by claw::text::glob_match().

template<typename InputIterator1 , typename InputIterator2 >
bool claw::glob_potential_match ( InputIterator1  pattern_first,
InputIterator1  pattern_last,
InputIterator2  first,
InputIterator2  last,
typename InputIterator1::value_type  any_sequence,
typename InputIterator1::value_type  zero_or_one,
typename InputIterator1::value_type  any 
)

Check if a sequence may match a given pattern.

Parameters
pattern_firstIterator on the beginning of the pattern.
pattern_lastIterator just past the end of the pattern.
firstIterator on the beginning of the sequence.
lastIterator just last the end of the sequence.
any_sequenceA value representing any sequence of values, empty or not.
zero_or_oneA value representing any value or no value.
anyA value representing any value.

Definition at line 102 of file glob.tpp.

Referenced by claw::text::glob_potential_match().

template<typename InputIterator , typename UnaryFunction >
UnaryFunction claw::inplace_for_each ( InputIterator  first,
InputIterator  last,
UnaryFunction  f 
)

Apply an unary function to all members of a sequence.

This function works like std::for_each() but allows the function to apply non-const methods to its argument.

Parameters
firstIterator on the first element of the sequence.
lastIterator just past the end of the sequence.
fFunction to apply to the elements of the sequence.
Remarks
The return value of the unary function is ignored.

Definition at line 46 of file algorithm.tpp.

claw::log_system & claw::lendl ( claw::log_system log)

Add a new line caracter to a logger and flush it.

Parameters
logThe logger to flush.

Definition at line 177 of file logger.cpp.

template<typename ForwardIterator1 , typename ForwardIterator2 , typename ForwardIterator3 >
std::size_t claw::replace ( ForwardIterator1  first,
ForwardIterator1  last,
ForwardIterator2  e1_first,
ForwardIterator2  e1_last,
ForwardIterator3  e2_first,
ForwardIterator3  e2_last 
)

Replace a set of elements in a range by other elements.

Parameters
firstIterator on the first element in the range to modify.
lastIterator just past the end of the range to modify.
e1_firstIterator on the first element to replace.
e1_lastIterator just past the last element to replace.
e2_firstIterator on the first element to replace with.
e2_lastIterator just past the last element to replace with.
Returns
The number of replaced elements.

Each element *(e1_first + i) will be replaced with *(e2_first + i). If the range (e1_first, e1_last) is smaller than (e2_first, e2_last), the latter will be completed by repeating its last element.

Example : int* r = { 1, 0, 1, 1, 0, 2, 3, 0, 5, 1 }; unsigned int* e1 = { 0, 1, 2 }; unsigned int* e2 = { 1, 0 }; claw::replace( r, r+10, e1, e1+3, e2, e2+2 ); // r is now { 0, 1, 0, 0, 1, 0, 3, 1, 5, 0 }

Definition at line 114 of file algorithm.tpp.

Referenced by claw::text::replace().