6#ifndef scannerConnectors_hh
7#define scannerConnectors_hh
17#define JoinerConstr_D 0
18#define JoinerDestr_D 0
37 virtual bool eos()
const = 0;
46 template<
class T,
unsigned nlnk>
49 template<
class T,
unsigned nlnk>
50 std::ostream& operator<<(std::ostream&
os,
72 template<
class T,
unsigned nlnk>
118 void operator =(
const Joiner&);
124 template <
class T,
unsigned nlnk>
127 DEBUGL(JoinerConstr_D,
"start.");
130 lnk_[
nlnk - 1] = lnk;
131 DEBUGL(JoinerConstr_D,
"done.");
134 template <
class T,
unsigned nlnk>
136 DEBUGL(JoinerDestr_D,
"start.");
138 if (j) {destructor_(j); j = 0;}
144 if (values)
delete foo->val_;
148 DEBUGL(JoinerDestr_D,
"done.");
151 template <
class T,
unsigned nlnk>
154 if (j->lnk_[i]) destructor_(j->lnk_[i]);
156 if (values)
delete j->val_;
160 template<
class T,
unsigned nlnk>
162 os <<
"J(" << j.val_ <<
" -> [" << std::flush;
165 os << *j.lnk_[i] <<
", " << std::flush;
167 os << *j.lnk_[
nlnk-1] << std::flush;
168 return os <<
"])" << std::flush;
192 bool eos()
const {
return eos_; }
204 tmp = current_->value();
205 current_ = (*current_)[0];
206 if ((eos_ = current_ == 0)) current_ = head_;
232 bool eos()
const {
return eos_; }
242 T& tmp = current_->value();
245 current_ = (*current_)[0];
246 if ((eos_ = current_ == 0)) current_ = head_;
260 : i_(v.begin()), last_(v.end()) {}
262 typename std::vector<T*>::const_iterator last)
263 : i_(
first), last_(last) {}
265 : i_(scan.i_), last_(scan.last_) {}
266 inline bool eos()
const {
return i_ == last_; }
270 typename std::vector<T*>::iterator i_;
271 typename std::vector<T*>::const_iterator last_;
282 typedef std::vector<T*> Vector;
301 : vec(vec), it(vec.begin())
304 bool eos()
const {
return it == vec.end(); }
338 idx_(scan.idx_), container_(scan.container_) {}
339 inline bool eos()
const {
return idx_ == container_.
size(); }
358 singleton_(
other.singleton_), eos_(
other.eos_) {}
360 bool eos() const {
return eos_; }
bool eos() const
Returns true if the end of the scanned set is reached.
Scan< T > * clone() const
Returns a clone of the scanner.
T & operator++(int)
Returns the next element in the scanned set.
uint size() const
Returns the requested size of the array.
Joiner *& operator[](uint i)
T & value()
Returns the content of the container.
Joiner(const T &val, Joiner *lnk=0)
static void destructor(Joiner< T, nlnk > *&j, bool values=true)
T & operator++(int)
Returns the next element in the scanned set.
ListScan(Joiner< T, 1 > &cnr)
ListScan< T > * clone() const
Returns a clone of the scanner.
bool eos() const
Returns true if the end of the scanned set is reached.
PListScan(Joiner< T *, 1 > &cnr)
bool eos() const
Returns true if the end of the scanned set is reached.
T & operator++(int)
Returns the next element in the scanned set.
PListScan< T > * clone() const
Returns a clone of the scanner.
bool eos() const
Returns true if the end of the scanned set is reached.
T & operator++(int)
Returns the next element in the scanned set.
PStlVectorScan< T > * clone() const
Returns a clone of the scanner.
virtual T & operator++(int)=0
Returns the next element in the scanned set.
virtual bool eos() const =0
Returns true if the end of the scanned set is reached.
virtual Scan * clone() const =0
Returns a clone of the scanner.
T & operator++(int)
Returns the next element in the scanned set.
bool eos() const
Returns true if the end of the scanned set is reached.
SingletonScan * clone() const
Returns a clone of the scanner.
StlVectorScan(const Vector &vec, ItType it)
StlVectorScan * clone() const
Returns a clone of the scanner.
StlVectorScan(Vector &vec)
T & operator++()
pre-increment operator
bool eos() const
Returns true if the end of the scanned set is reached.
T & operator++(int)
post-increment operator
#define conceptsAssert(cond, exc)
#define DEBUGL(doit, msg)
Set< F > makeSet(uint n, const F &first,...)