00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef RESOURCEPOOL_SQL_BINDOUT_HH
00025 #define RESOURCEPOOL_SQL_BINDOUT_HH
00026
00027 #include "ResourcePool/SQL/BindOutInterface.hh"
00028
00029 #ifndef INCLUDED_GC_PTR_HH
00030 #include "mm/gc_ptr.hh"
00031 #endif
00032
00033 #include <vector>
00034
00035 namespace fatalmind {
00036 namespace SQL {
00037
00038
00043 template<class VBC, template <class> class CT>
00044 class BindOut: public BindOutInterface {
00045 public:
00046 virtual ~BindOut();
00047
00048 template<typename T>
00049 void bindout(const unsigned int pos, T& val, bool& isnull);
00050
00051 template<typename T>
00052 void bindout(const unsigned int pos, T& val, BindOutNotNullConstraint = NOTNULL);
00053
00054 protected:
00055 VBC& getOutParam(const unsigned int pos);
00056
00057 typedef gc_ptr<VBC> _refT;
00058 typedef std::vector<_refT> _outparamt;
00059 _outparamt _outparam;
00060
00061 typename _outparamt::const_iterator _begin;
00062 typename _outparamt::const_iterator _end;
00063
00064 void setIterators() {
00065 _begin = _outparam.begin();
00066 _end = _outparam.end();
00067 }
00068 };
00069
00070
00071 }
00072 }
00073 #endif