CheckSlice< Size, Start, Length > Struct Template Reference
[TooN internals]

Check if a slice is OK. This class is used to see if a slice is OK. It provides a callable function which checks the run-time slice information. If the compile time information is bad, then it will not compile at all. Otherwise, the sizes are checked at run-time. The check will be optimized away if the sizes are known statically. More...

#include <slice_error.hh>

List of all members.

Classes

struct  N
 choose a number statically or dynamically. More...

Static Public Member Functions

static void check ()
static void check (int size, int start, int length)


Detailed Description

template<int Size, int Start, int Length>
struct TooN::Internal::CheckSlice< Size, Start, Length >

Check if a slice is OK. This class is used to see if a slice is OK. It provides a callable function which checks the run-time slice information. If the compile time information is bad, then it will not compile at all. Otherwise, the sizes are checked at run-time. The check will be optimized away if the sizes are known statically.

For internal use only.


Member Function Documentation

static void check (  )  [static]

Check the slice. This is full static checking, which is stricter than mixed chacking. For instance, none of the slice parameters. This should be used in addition to the other check function. are allowed to be -1 (Dynamic).

For internal use only.

Referenced by CheckSlice< Size, Start, Length >::check().

static void check ( int  size,
int  start,
int  length 
) [static]

Check the slice. The policy is that static sized where present are used. However, for extra debugging one can test to see if the static and dynamic sizes are mismatched. any sense whatsoever.

For internal use only.

Parameters:
size Vector size
start Start position of the slice
length Length of the slice.

References CheckSlice< Size, Start, Length >::check(), and TooN::Dynamic.


Generated on Tue Oct 27 16:09:25 2009 for TooN by  doxygen 1.5.9