0.12.0
Freundlich's C++ toolkit
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Typedefs | Functions
fcppt::container::grid Namespace Reference

Contains fcppt::container::grid::object and helper types/functions for it. More...

Classes

struct  dim
 
class  exception
 
class  object
 A simple n dimensional arraySee the module description for more information. More...
 
class  out_of_range
 Thrown by the grid's at function. More...
 

Typedefs

typedef unsigned size_type
 

Functions

template<typename T , size_type N, typename A >
bool operator== (object< T, N, A > const &_a, object< T, N, A > const &_b)
 
template<typename T , size_type N, typename A >
bool operator!= (object< T, N, A > const &_a, object< T, N, A > const &_b)
 
template<typename T , size_type N, typename A >
bool operator< (object< T, N, A > const &_a, object< T, N, A > const &_b)
 
template<typename T , size_type N, typename A >
bool operator> (object< T, N, A > const &_a, object< T, N, A > const &_b)
 
template<typename T , size_type N, typename A >
bool operator<= (object< T, N, A > const &_a, object< T, N, A > const &_b)
 
template<typename T , size_type N, typename A >
bool operator>= (object< T, N, A > const &_a, object< T, N, A > const &_b)
 
template<typename T , fcppt::container::grid::size_type N, typename A , typename Fn >
void fill (object< T, N, A > &g, Fn const &f)
 Fills a grid using a functor.
 
template<typename T , fcppt::container::grid::size_type N, typename A >
bool in_range (grid::object< T, N, A > const &_grid, typename grid::object< T, N, A >::dim const &_pos)
 Checks if the given position _pos is out of bounds.
 
template<typename Grid , typename Vector , typename Interpolator >
Grid::value_type const interpolate (Grid const &grid, Vector const &floating_point_position, Interpolator const &interpolator)
 Interpolates a value inside the grid cells.
 
template<typename T , grid::size_type N>
bool is_square (grid::object< T, N > const &g)
 Checks if a grid is a square or a rectangle.
 
template<typename Grid , typename Iterator >
Grid::dim const iterator_position (Grid const &grid, Iterator const it)
 Returns the position of an iterator.
 
template<typename T , size_type N, typename A >
void swap (object< T, N, A > &, object< T, N, A > &)
 
template<typename Ch , typename Traits , typename T , fcppt::container::grid::size_type N, typename A >
std::basic_ostream< Ch, Traits > & operator<< (std::basic_ostream< Ch, Traits > &_stream, grid::object< T, N, A > const &_object)
 Outputs a grid.
 
template<typename T , fcppt::container::grid::size_type N, typename A >
void resize_preserve (grid::object< T, N, A > &_result, typename grid::object< T, N, A >::dim const &_new_size)
 Resizes _result to _newsize and preserves all elements possible For every p where every component of p is less than every component of _new_size, _result[p] will be preserved.
 
template<typename T , fcppt::container::grid::size_type N, typename A >
void resize_preserve_init (grid::object< T, N, A > &_result, typename grid::object< T, N, A >::dim const &_new_size, typename grid::object< T, N, A >::const_reference _value)
 Like resize_preserve but also initializes new elements For every p where every component of p is greater or equal to _new_size _result[p] will be assigned from _value.
 

Detailed Description

Contains fcppt::container::grid::object and helper types/functions for it.

Typedef Documentation

Function Documentation

template<typename T , size_type N, typename A >
bool fcppt::container::grid::operator!= ( object< T, N, A > const &  _a,
object< T, N, A > const &  _b 
)
template<typename T , size_type N, typename A >
bool fcppt::container::grid::operator< ( object< T, N, A > const &  _a,
object< T, N, A > const &  _b 
)
template<typename T , size_type N, typename A >
bool fcppt::container::grid::operator<= ( object< T, N, A > const &  _a,
object< T, N, A > const &  _b 
)
template<typename T , size_type N, typename A >
bool fcppt::container::grid::operator== ( object< T, N, A > const &  _a,
object< T, N, A > const &  _b 
)
template<typename T , size_type N, typename A >
bool fcppt::container::grid::operator> ( object< T, N, A > const &  _a,
object< T, N, A > const &  _b 
)
template<typename T , size_type N, typename A >
bool fcppt::container::grid::operator>= ( object< T, N, A > const &  _a,
object< T, N, A > const &  _b 
)
template<typename T , fcppt::container::grid::size_type N, typename A >
void fcppt::container::grid::resize_preserve ( grid::object< T, N, A > &  _result,
typename grid::object< T, N, A >::dim const &  _new_size 
)

Resizes _result to _newsize and preserves all elements possible For every p where every component of p is less than every component of _new_size, _result[p] will be preserved.

template<typename T , fcppt::container::grid::size_type N, typename A >
void fcppt::container::grid::resize_preserve_init ( grid::object< T, N, A > &  _result,
typename grid::object< T, N, A >::dim const &  _new_size,
typename grid::object< T, N, A >::const_reference  _value 
)

Like resize_preserve but also initializes new elements For every p where every component of p is greater or equal to _new_size _result[p] will be assigned from _value.

template<typename T , size_type N, typename A >
void fcppt::container::grid::swap ( object< T, N, A > &  _a,
object< T, N, A > &  _b 
)