Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Utility constructs for Vaucanson


Files

file  selectors.hh
 Definition of type argument macros.

file  unique.hh
 Declarations for the type canonicalization tools.

file  static.hh
 Definition of metaprogrammation helpers.

file  random.hh
 Definition of random generators.

file  contract.hh
 Definition of contract macros.

file  limits.hh
 Wrapper about the numeric limits for Vaucanson.


Namespaces

namespace  utility
 In Vaucanson, several types of contracts can be placed in the library code.


Modules

Contract checking for Vaucansn

Classes

struct  remove_reference
 Turn a reference type into its corresponding plain type. More...

struct  remove_const
 Turn a const type into its corresponding mutable type. More...

struct  static_if
 Choose between two types or values depending on a constant boolean. More...

struct  static_eq
 Test for equality between two types. More...

struct  static_pow
 Static exponentiation. More...

struct  static_pow_minus_one
 Static exponentiation, result minus one. More...

class  SupportIterator
 Iterator over the Support generic class. More...

class  Support< std::map< U, T > >
 Support<map<U, T> > is a const adapter of std::map to container. More...

class  SparseIterator
 SparseIterator is an iterator over range except some points. More...

class  SparseInterval
 Container over a sparse integer range. More...

class  SelfIterator
 SelfIterator is an iterator which is also a container. More...

struct  Window
 Handle windows in streams for performing regular expression search. More...


[NOHEADER]

void utility::Window::shift (unsigned int n)
void utility::Window::shift ()

Defines

#define SELECT(T)   (*(const T*)0)
 Type argument for types with no commas (simple or 1-par templates).

#define SELECT2(T1, T2)   (*(const T1 , T2 *)0)
 Type argument for types with one comma (2-parameters templates).

#define SELECT3(T1, T2, T3)   (*(const T1 , T2, T3 *)0)
 Type argument for types with two commas (3-parameters templates).

#define SELECT4(T1, T2, T3, T4)   (*(const T1 , T2, T3, T4 *)0)
 Type argument for types with three commas (4-parameters templates).

#define SELECTOR(T)   const T &
 Type formal argument for types with no commas (simple or 1-par templates).

#define SELECTOR2(T1, T2)   const T1 , T2 &
 Type formal argument for types with one comma (2-parameters templates).

#define SELECTOR3(T1, T2, T3)   const T1 , T2, T3 &
 Type formal argument for types with two commas (3-parameters templates).

#define SELECTOR4(T1, T2, T3, T4)   const T1 , T2, T3, T4 &
 Type formal argument for types with three commas (4-parameters templates).


Functions

template<typename T> T utility::random::generate ()
 Generate a random value.

template<typename T> T utility::random::generate (T min, T max)
 Generate a random value between bounds.

template<> char utility::random::generate< char > ()
 Generate a random character.

template<> char utility::random::generate< char > (char min, char max)
 Generate a random character between bounds.

char utility::random::generate_letter ()
 Generate a random lowercase letter.

char utility::random::generate_digit ()
 Generate a random digit.

template<> bool utility::random::generate< bool > ()
 Generate a random Boolean.

template<> int utility::random::generate< int > ()
 Generate a random integer.

template<> int utility::random::generate< int > (int min, int max)
 Generate a random integer between two bounds.

template<> float utility::random::generate< float > ()
 Generate a random float between 0 and 1.

template<typename T> const T & utility::unique::get (const T &)
 The canonicalization operator.

template<typename T> const T * utility::unique::get (const T *)
 Version of the canonicalization operator for pointers.

 utility::Window::Window (const iterator_t &stream, const iterator_t &eof, letter_t eol, length_t length)
 @ brief Standard constructor for the Window class.

bool utility::Window::eof () const
 Indicates wether the end of the stream has been reached or not.

bool utility::Window::eol () const
 Indicates wether a new line has been reached or not.

void utility::Window::moveto (length_t offset)
 Move to a specific offset.

length_t utility::Window::size () const
 Returns the actual window size.

letter_t utility::Window::operator[] (length_t i) const
 Returns the i-th character of the window.

std::ostream & utility::Window::print (std::ostream &ostr) const
 Print the window.

iterator_t utility::Window::begin () const
 Accessor to class members.


Function Documentation

T generate min,
max
 

Generate a random value between bounds.

This function returns a value between min and max (inclusive).

const T & get const T &   ) 
 

The canonicalization operator.

This operator uses the unique_map structure to retrieve the unique instance equal to the given value.

See also:
unique_map

Window const iterator_t &  stream,
const iterator_t &  eof,
letter_t  eol,
length_t  length
[inherited]
 

@ brief Standard constructor for the Window class.

Build a window from a couple of begin/end iterator, a newline character and a window length.

Parameters:
stream Iterator to the begining of the stream.
eof Iterator to the end of the stream.
eol The newline character.
length The window length.
See also:
Window

void shift unsigned int  n  )  [inherited]
 

n The number of character the window must be shifted. When not specified, the window length is taken.

void shift  )  [inherited]
 

n The number of character the window must be shifted. When not specified, the window length is taken.


Generated on Thu Dec 18 14:14:22 2003 for Vaucanson by doxygen 1.3.4