28 #if !defined(MYSQLPP_VALLIST_H) 
   29 #define MYSQLPP_VALLIST_H 
   59 template <
class Seq1, 
class Seq2, 
class Manip>
 
   92                         const char* e, Manip m) :
 
  114 template <
class Seq1, 
class Seq2, 
class Manip>
 
  153                         const std::vector<bool>& f, 
const char* d,
 
  154                         const char* e, Manip m) :
 
  185 template <
class Seq, 
class Manip>
 
  225 template <
class Seq, 
class Manip>
 
  253                         const char* d, Manip m) :
 
  272 template <
class Seq1, 
class Seq2, 
class Manip>
 
  273 std::ostream& operator <<(std::ostream& o,
 
  274                 const equal_list_ba<Seq1, Seq2, Manip>& el)
 
  276         typename Seq1::const_iterator i = el.list1->begin();
 
  277         typename Seq2::const_iterator j = el.list2->begin();
 
  280                 o << *i << el.equl << el.manip << *j;
 
  281                 if ((++i == el.list1->end()) || (++j == el.list2->end())) {
 
  296 template <
class Seq1, 
class Seq2, 
class Manip>
 
  297 std::ostream& operator <<(std::ostream& o,
 
  298                 const equal_list_b <Seq1, Seq2, Manip>& el)
 
  300         typename Seq1::const_iterator i = el.list1->begin();
 
  301         typename Seq2::const_iterator j = el.list2->begin();
 
  305                 if (el.fields[k++]) {
 
  306                         o << *i << el.equl << el.manip << *j;
 
  308                 if ((++i == el.list1->end()) || (++j == el.list2->end())) {
 
  329 template <
class Seq, 
class Manip>
 
  330 std::ostream& operator <<(std::ostream& o,
 
  331                 const value_list_ba<Seq, Manip>& cl)
 
  333         typename Seq::const_iterator i = cl.list->begin();
 
  337                 if (++i == cl.list->end()) {
 
  352 template <
class Seq, 
class Manip>
 
  353 std::ostream& operator <<(std::ostream& o,
 
  354                 const value_list_b<Seq, Manip>& cl)
 
  356         typename Seq::const_iterator i = cl.list->begin();
 
  360                 if (cl.fields[k++]) {
 
  363                 if (++i == cl.list->end()) {
 
  385 void create_vector(
size_t size, std::vector<bool>& v, 
bool t0,
 
  386                 bool t1 = 
false, 
bool t2 = 
false, 
bool t3 = 
false,
 
  387                 bool t4 = 
false, 
bool t5 = 
false, 
bool t6 = 
false,
 
  388                 bool t7 = 
false, 
bool t8 = 
false, 
bool t9 = 
false,
 
  389                 bool ta = 
false, 
bool tb = 
false, 
bool tc = 
false);
 
  404 template <
class Container>
 
  405 void create_vector(
const Container& c, std::vector<bool>& v,
 
  406                 std::string s0, std::string s1, std::string s2,
 
  407                 std::string s3, std::string s4, std::string s5,
 
  408                 std::string s6, std::string s7, std::string s8,
 
  409                 std::string s9, std::string sa, std::string sb,
 
  425 value_list_ba<Seq, do_nothing_type0>
 
  426 value_list(
const Seq& s, 
const char* d = 
",")
 
  428         return value_list_ba<Seq, do_nothing_type0>(s, d, do_nothing);
 
  438 template <
class Seq, 
class Manip>
 
  439 value_list_ba<Seq, Manip>
 
  440 value_list(
const Seq& s, 
const char* d, Manip m)
 
  442         return value_list_ba<Seq, Manip>(s, d, m);
 
  455 template <
class Seq, 
class Manip>
 
  456 inline value_list_b<Seq, Manip>
 
  457 value_list(
const Seq& s, 
const char* d, Manip m,
 
  458                 const std::vector<bool>& vb)
 
  460         return value_list_b<Seq, Manip>(s, vb, d, m);
 
  470 template <
class Seq, 
class Manip>
 
  471 value_list_b<Seq, Manip>
 
  472 value_list(
const Seq& s, 
const char* d, Manip m, 
bool t0,
 
  473                 bool t1 = 
false, 
bool t2 = 
false, 
bool t3 = 
false,
 
  474                 bool t4 = 
false, 
bool t5 = 
false, 
bool t6 = 
false,
 
  475                 bool t7 = 
false, 
bool t8 = 
false, 
bool t9 = 
false,
 
  476                 bool ta = 
false, 
bool tb = 
false, 
bool tc = 
false)
 
  478         std::vector<bool> vb;
 
  479         create_vector(s.size(), vb, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9,
 
  481         return value_list_b<Seq, Manip>(s, vb, d, m);
 
  492 value_list_b<Seq, do_nothing_type0>
 
  493 value_list(
const Seq& s, 
const char* d, 
bool t0,
 
  494                 bool t1 = 
false, 
bool t2 = 
false, 
bool t3 = 
false,
 
  495                 bool t4 = 
false, 
bool t5 = 
false, 
bool t6 = 
false,
 
  496                 bool t7 = 
false, 
bool t8 = 
false, 
bool t9 = 
false,
 
  497                 bool ta = 
false, 
bool tb = 
false, 
bool tc = 
false)
 
  499         std::vector<bool> vb;
 
  500         create_vector(s.size(), vb, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9,
 
  502         return value_list_b<Seq, do_nothing_type0>(s, vb, d, do_nothing);
 
  516 value_list_b<Seq, do_nothing_type0>
 
  517 value_list(
const Seq& s, 
bool t0,
 
  518                 bool t1 = 
false, 
bool t2 = 
false, 
bool t3 = 
false,
 
  519                 bool t4 = 
false, 
bool t5 = 
false, 
bool t6 = 
false,
 
  520                 bool t7 = 
false, 
bool t8 = 
false, 
bool t9 = 
false,
 
  521                 bool ta = 
false, 
bool tb = 
false, 
bool tc = 
false)
 
  523         std::vector<bool> vb;
 
  524         create_vector(s.size(), vb, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9,
 
  526         return value_list_b<Seq, do_nothing_type0>(s, vb, 
",", do_nothing);
 
  551 template <
class Seq1, 
class Seq2>
 
  552 equal_list_ba<Seq1, Seq2, do_nothing_type0>
 
  553 equal_list(
const Seq1& s1, 
const Seq2& s2, 
const char *d = 
",",
 
  554                 const char *e = 
" = ")
 
  556         return equal_list_ba<Seq1, Seq2, do_nothing_type0>(s1, s2, d,
 
  567 template <
class Seq1, 
class Seq2, 
class Manip>
 
  568 equal_list_ba<Seq1, Seq2, Manip>
 
  569 equal_list(
const Seq1& s1, 
const Seq2& s2, 
const char* d,
 
  570                 const char* e, Manip m)
 
  572         return equal_list_ba<Seq1, Seq2, Manip>(s1, s2, d, e, m);
 
  584 template <
class Seq1, 
class Seq2, 
class Manip>
 
  585 equal_list_b<Seq1, Seq2, Manip>
 
  586 equal_list(
const Seq1& s1, 
const Seq2& s2, 
const char* d,
 
  587                 const char *e, Manip m, 
const std::vector<bool>& vb)
 
  589         return equal_list_b<Seq1, Seq2, Manip>(s1, s2, vb, d, e, m);
 
  599 template <
class Seq1, 
class Seq2, 
class Manip>
 
  600 equal_list_b<Seq1, Seq2, Manip>
 
  601 equal_list(
const Seq1& s1, 
const Seq2& s2, 
const char* d,
 
  602                 const char* e, Manip m, 
bool t0, 
bool t1 = 
false,
 
  603                 bool t2 = 
false, 
bool t3 = 
false, 
bool t4 = 
false,
 
  604                 bool t5 = 
false, 
bool t6 = 
false, 
bool t7 = 
false,
 
  605                 bool t8 = 
false, 
bool t9 = 
false, 
bool ta = 
false,
 
  606                 bool tb = 
false, 
bool tc = 
false)
 
  608         std::vector<bool> vb;
 
  609         create_vector(s1.size(), vb, t0, t1, t2, t3, t4, t5, t6, t7, t8,
 
  611         return equal_list_b<Seq1, Seq2, Manip>(s1, s2, vb, d, e, m);
 
  622 template <
class Seq1, 
class Seq2>
 
  623 equal_list_b<Seq1, Seq2, do_nothing_type0>
 
  624 equal_list(
const Seq1& s1, 
const Seq2& s2, 
const char* d,
 
  625                 const char* e, 
bool t0, 
bool t1 = 
false, 
bool t2 = 
false,
 
  626                 bool t3 = 
false, 
bool t4 = 
false, 
bool t5 = 
false,
 
  627                 bool t6 = 
false, 
bool t7 = 
false, 
bool t8 = 
false,
 
  628                 bool t9 = 
false, 
bool ta = 
false, 
bool tb = 
false,
 
  631         std::vector<bool> vb;
 
  632         create_vector(s1.size(), vb, t0, t1, t2, t3, t4, t5, t6, t7, t8,
 
  634         return equal_list_b<Seq1, Seq2, do_nothing_type0>(s1, s2, vb,
 
  645 template <
class Seq1, 
class Seq2>
 
  646 equal_list_b<Seq1, Seq2, do_nothing_type0>
 
  647 equal_list(
const Seq1& s1, 
const Seq2& s2, 
const char* d, 
bool t0,
 
  648                 bool t1 = 
false, 
bool t2 = 
false, 
bool t3 = 
false,
 
  649                 bool t4 = 
false, 
bool t5 = 
false, 
bool t6 = 
false,
 
  650                 bool t7 = 
false, 
bool t8 = 
false, 
bool t9 = 
false,
 
  651                 bool ta = 
false, 
bool tb = 
false, 
bool tc = 
false)
 
  653         std::vector<bool> vb;
 
  654         create_vector(s1.size(), vb, t0, t1, t2, t3, t4, t5, t6, t7, t8,
 
  656         return equal_list_b<Seq1, Seq2, do_nothing_type0>(s1, s2, vb,
 
  657                         d, 
" = ", do_nothing);
 
  669 template <
class Seq1, 
class Seq2>
 
  670 equal_list_b<Seq1, Seq2, do_nothing_type0>
 
  671 equal_list(
const Seq1& s1, 
const Seq2& s2, 
bool t0, 
bool t1 = 
false,
 
  672                 bool t2 = 
false, 
bool t3 = 
false, 
bool t4 = 
false,
 
  673                 bool t5 = 
false, 
bool t6 = 
false, 
bool t7 = 
false,
 
  674                 bool t8 = 
false, 
bool t9 = 
false, 
bool ta = 
false,
 
  675                 bool tb = 
false, 
bool tc = 
false)
 
  677         std::vector<bool> vb;
 
  678         create_vector(s1.size(), vb, t0, t1, t2, t3, t4, t5, t6, t7, t8,
 
  680         return equal_list_b<Seq1, Seq2, do_nothing_type0>(s1, s2, vb,
 
  681                         ",", 
" = ", do_nothing);
 
  686 #endif // !defined(MYSQLPP_VALLIST_H) 
const char * delim
delimiter to use between each pair of elements 
Definition: vallist.h:130
value_list_b(const Seq &s, const std::vector< bool > &f, const char *d, Manip m)
Create object. 
Definition: vallist.h:252
Holds a list of items, typically used to construct a SQL "value list". 
Definition: vallist.h:186
const Seq * list
set of objects in the value list 
Definition: vallist.h:189
equal_list_ba(const Seq1 &s1, const Seq2 &s2, const char *d, const char *e, Manip m)
Create object. 
Definition: vallist.h:91
Manip manip
manipulator to use when inserting the list into a C++ stream 
Definition: vallist.h:241
const Seq2 * list2
the list of objects on the right-hand side of the equals sign 
Definition: vallist.h:123
Manip manip
manipulator to use when inserting the equal_list into a C++ stream 
Definition: vallist.h:79
const Seq * list
set of objects in the value list 
Definition: vallist.h:229
const char * delim
delimiter to use between each pair of elements 
Definition: vallist.h:71
Declares the Query stream manipulators and operators. 
equal_list_b(const Seq1 &s1, const Seq2 &s2, const std::vector< bool > &f, const char *d, const char *e, Manip m)
Create object. 
Definition: vallist.h:152
const Seq1 * list1
the list of objects on the left-hand side of the equals sign 
Definition: vallist.h:119
const char * delim
delimiter to use between each value in the list when inserting it into a C++ stream ...
Definition: vallist.h:193
Manip manip
manipulator to use when inserting the list into a C++ stream 
Definition: vallist.h:197
const Seq2 * list2
the list of objects on the right-hand side of the equals sign 
Definition: vallist.h:68
Same as value_list_ba, plus the option to have some elements of the list suppressed. 
Definition: vallist.h:226
const std::vector< bool > fields
for each true item in the list, the pair in that position will be inserted into a C++ stream ...
Definition: vallist.h:127
const std::vector< bool > fields
delimiter to use between each value in the list when inserting it into a C++ stream ...
Definition: vallist.h:233
const char * equl
"equal" sign to use between each item in each equal pair; doesn't have to actually be " = " ...
Definition: vallist.h:75
Manip manip
manipulator to use when inserting the equal_list into a C++ stream 
Definition: vallist.h:138
Same as equal_list_ba, plus the option to have some elements of the equals clause suppressed...
Definition: vallist.h:115
Holds two lists of items, typically used to construct a SQL "equals clause". 
Definition: vallist.h:60
const Seq1 * list1
the list of objects on the left-hand side of the equals sign 
Definition: vallist.h:64
const char * equl
"equal" sign to use between each item in each equal pair; doesn't have to actually be " = " ...
Definition: vallist.h:134
const char * delim
delimiter to use between each value in the list when inserting it into a C++ stream ...
Definition: vallist.h:237
value_list_ba(const Seq &s, const char *d, Manip m)
Create object. 
Definition: vallist.h:206