yat  0.10.4pre
Container2D

Description

Container2D is a Container that stores elements in a two-dimensional array (columns and rows). It provides element access of a specific row and column, as well as iterators that can be used to iterate over a specific column or row.

Requirements

A Container2D provides the following:

Types

Value typeX::value_type Type of element stored in Container.
Const reference typeX::const_reference A type that behaves as const reference to the Container2D 's value type.
Const iterator type X::const_iterator A read-only iterator that can be used to iterate over the entire Container2D. Typically the iterator iterates along a row, and when the end of one row is reached it jumps to the beginning of the next row.
Const column iterator type X::const_column_iterator A read-only iterator that can be used to examine the elements in one column of the Container2D.
Const row iterator type X::const_row_iterator A read-only iterator that can be used to examine the elements in one row of the Container2D.

Public Functions

NameExpressionPreconditionReturn type Postcondition
Beginning of range a.begin()   const_iterator  
Beginning of column a.begin_column(size_t column) 0 <= column < a.columns() const_column_iterator  
Beginning of row a.begin_row(size_t row) 0 <= row < a.rows() const_row_iterator  
End of range a.end()   const_iterator  
End of column a.end_column(size_t column) 0 <= column < a.columns() const_column_iterator  
End of row a.end_row(size_t row) 0 <= row < a.rows() const_row_iterator  
Columns a.columns()   size_t  
Rows a.rows()   size_t  
Element Access a(size_t row, size_t column) 0 <= row < a.rows() and 0 <= column < a.columns() const_reference  

Implementations

Examples of concept Container2D include:


Generated on Mon Nov 11 2013 09:41:44 for yat by  doxygen 1.8.1