#include <Generator_System.defs.hh>
Public Member Functions | |
const_iterator () | |
Default constructor. | |
const_iterator (const const_iterator &y) | |
Ordinary copy-constructor. | |
~const_iterator () | |
Destructor. | |
const_iterator & | operator= (const const_iterator &y) |
Assignment operator. | |
const Generator & | operator* () const |
Dereference operator. | |
const Generator * | operator-> () const |
Indirect member selector. | |
const_iterator & | operator++ () |
Prefix increment operator. | |
const_iterator | operator++ (int) |
Postfix increment operator. | |
bool | operator== (const const_iterator &y) const |
Returns true if and only if *this and y are identical. | |
bool | operator!= (const const_iterator &y) const |
Returns true if and only if *this and y are different. | |
Private Member Functions | |
const_iterator (const Linear_System::const_iterator &iter, const Generator_System &gsys) | |
Constructor. | |
void | skip_forward () |
*this skips to the next generator, skipping those closure points that are immediately followed by a matching point. | |
Private Attributes | |
Linear_System::const_iterator | i |
The const iterator over the Linear_System. | |
const Linear_System * | gsp |
A const pointer to the Linear_System. | |
Friends | |
class | Generator_System |
A const_iterator is used to provide read-only access to each generator contained in an object of Generator_System.
ph
: const Generator_System& gs = ph.generators(); for (Generator_System::const_iterator i = gs.begin(), gs_end = gs.end(); i != gs_end; ++i) cout << *i << endl;
const Generator_System& gs = ph.generators(); copy(gs.begin(), gs.end(), ostream_iterator<Generator>(cout, "\n"));
Definition at line 245 of file Generator_System.defs.hh.
Parma_Polyhedra_Library::Generator_System::const_iterator::const_iterator | ( | ) | [inline] |
Default constructor.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 94 of file Generator_System.inlines.hh.
Parma_Polyhedra_Library::Generator_System::const_iterator::const_iterator | ( | const const_iterator & | y | ) | [inline] |
Ordinary copy-constructor.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 99 of file Generator_System.inlines.hh.
Parma_Polyhedra_Library::Generator_System::const_iterator::~const_iterator | ( | ) | [inline] |
Destructor.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 104 of file Generator_System.inlines.hh.
Parma_Polyhedra_Library::Generator_System::const_iterator::const_iterator | ( | const Linear_System::const_iterator & | iter, | |
const Generator_System & | gsys | |||
) | [inline, private] |
Generator_System::const_iterator & Parma_Polyhedra_Library::Generator_System::const_iterator::operator= | ( | const const_iterator & | y | ) | [inline] |
Assignment operator.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 109 of file Generator_System.inlines.hh.
References gsp, Parma_Polyhedra_Library::Matrix::const_iterator::i, and i.
Referenced by Parma_Polyhedra_Library::Grid_Generator_System::const_iterator::operator=().
const Generator & Parma_Polyhedra_Library::Generator_System::const_iterator::operator* | ( | ) | const [inline] |
Dereference operator.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 116 of file Generator_System.inlines.hh.
Referenced by Parma_Polyhedra_Library::Grid_Generator_System::const_iterator::operator*().
const Generator * Parma_Polyhedra_Library::Generator_System::const_iterator::operator-> | ( | ) | const [inline] |
Indirect member selector.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 121 of file Generator_System.inlines.hh.
References i.
Referenced by Parma_Polyhedra_Library::Grid_Generator_System::const_iterator::operator->().
00121 { 00122 return static_cast<const Generator*>(i.operator->()); 00123 }
Generator_System::const_iterator & Parma_Polyhedra_Library::Generator_System::const_iterator::operator++ | ( | ) | [inline] |
Prefix increment operator.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 126 of file Generator_System.inlines.hh.
References gsp, i, Parma_Polyhedra_Library::Linear_System::is_necessarily_closed(), and skip_forward().
Referenced by Parma_Polyhedra_Library::Grid_Generator_System::const_iterator::operator++(), and operator++().
00126 { 00127 ++i; 00128 if (!gsp->is_necessarily_closed()) 00129 skip_forward(); 00130 return *this; 00131 }
Generator_System::const_iterator Parma_Polyhedra_Library::Generator_System::const_iterator::operator++ | ( | int | ) | [inline] |
Postfix increment operator.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 134 of file Generator_System.inlines.hh.
References operator++().
00134 { 00135 const const_iterator tmp = *this; 00136 operator++(); 00137 return tmp; 00138 }
bool Parma_Polyhedra_Library::Generator_System::const_iterator::operator== | ( | const const_iterator & | y | ) | const [inline] |
Returns true
if and only if *this
and y
are identical.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 141 of file Generator_System.inlines.hh.
References Parma_Polyhedra_Library::Matrix::const_iterator::i, and i.
00141 { 00142 return i == y.i; 00143 }
bool Parma_Polyhedra_Library::Generator_System::const_iterator::operator!= | ( | const const_iterator & | y | ) | const [inline] |
Returns true
if and only if *this
and y
are different.
Reimplemented in Parma_Polyhedra_Library::Grid_Generator_System::const_iterator.
Definition at line 146 of file Generator_System.inlines.hh.
References Parma_Polyhedra_Library::Matrix::const_iterator::i, and i.
00146 { 00147 return i != y.i; 00148 }
void Parma_Polyhedra_Library::Generator_System::const_iterator::skip_forward | ( | ) | [private] |
*this
skips to the next generator, skipping those closure points that are immediately followed by a matching point.
Definition at line 264 of file Generator_System.cc.
References Parma_Polyhedra_Library::Matrix::end(), gsp, i, Parma_Polyhedra_Library::Generator::is_closure_point(), Parma_Polyhedra_Library::Generator::is_matching_closure_point(), and Parma_Polyhedra_Library::Generator::is_point().
Referenced by operator++().
00264 { 00265 const Linear_System::const_iterator gsp_end = gsp->end(); 00266 if (i != gsp_end) { 00267 Linear_System::const_iterator i_next = i; 00268 ++i_next; 00269 if (i_next != gsp_end) { 00270 const Generator& cp = static_cast<const Generator&>(*i); 00271 const Generator& p = static_cast<const Generator&>(*i_next); 00272 if (cp.is_closure_point() 00273 && p.is_point() 00274 && cp.is_matching_closure_point(p)) 00275 i = i_next; 00276 } 00277 } 00278 }
friend class Generator_System [friend] |
Definition at line 289 of file Generator_System.defs.hh.
Linear_System::const_iterator Parma_Polyhedra_Library::Generator_System::const_iterator::i [private] |
The const iterator over the Linear_System.
Definition at line 292 of file Generator_System.defs.hh.
Referenced by operator!=(), operator++(), operator->(), operator=(), operator==(), and skip_forward().
A const pointer to the Linear_System.
Definition at line 295 of file Generator_System.defs.hh.
Referenced by operator++(), operator=(), and skip_forward().