Merge pull request #1127 from vmiklos/data-wshadow-fixes

GH #1050 Data: fix gcc -Wshadow warnings
This commit is contained in:
Günter Obiltschnig 2016-02-16 10:03:08 +01:00
commit 81e15f393f
27 changed files with 290 additions and 290 deletions

View File

@ -59,9 +59,9 @@ public:
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
explicit Binding(T& val, explicit Binding(T& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_val(val), _val(val),
_bound(false) _bound(false)
/// Creates the Binding using the passed reference as bound value. /// Creates the Binding using the passed reference as bound value.
@ -129,9 +129,9 @@ public:
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
explicit CopyBinding(T& val, explicit CopyBinding(T& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_pVal(new T(val)), _pVal(new T(val)),
_bound(false) _bound(false)
/// Creates the Binding using the passed reference as bound value. /// Creates the Binding using the passed reference as bound value.
@ -192,9 +192,9 @@ public:
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
explicit Binding(const char* pVal, explicit Binding(const char* pVal,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_val(pVal ? pVal : throw NullPointerException() ), _val(pVal ? pVal : throw NullPointerException() ),
_bound(false) _bound(false)
/// Creates the Binding by copying the passed string. /// Creates the Binding by copying the passed string.
@ -254,9 +254,9 @@ public:
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
explicit CopyBinding(const char* pVal, explicit CopyBinding(const char* pVal,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_val(pVal ? pVal : throw NullPointerException() ), _val(pVal ? pVal : throw NullPointerException() ),
_bound(false) _bound(false)
/// Creates the Binding by copying the passed string. /// Creates the Binding by copying the passed string.
@ -315,9 +315,9 @@ public:
typedef typename ValType::const_iterator Iterator; typedef typename ValType::const_iterator Iterator;
explicit Binding(std::vector<T>& val, explicit Binding(std::vector<T>& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_val(val), _val(val),
_begin(), _begin(),
_end() _end()
@ -382,9 +382,9 @@ public:
typedef typename ValType::const_iterator Iterator; typedef typename ValType::const_iterator Iterator;
explicit CopyBinding(std::vector<T>& val, explicit CopyBinding(std::vector<T>& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_pVal(new std::vector<T>(val)), _pVal(new std::vector<T>(val)),
_begin(), _begin(),
_end() _end()
@ -459,9 +459,9 @@ public:
typedef ValType::const_iterator Iterator; typedef ValType::const_iterator Iterator;
explicit Binding(const std::vector<bool>& val, explicit Binding(const std::vector<bool>& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_val(val), _val(val),
_deq(_val.begin(), _val.end()), _deq(_val.begin(), _val.end()),
_begin(), _begin(),
@ -541,9 +541,9 @@ public:
typedef ValType::const_iterator Iterator; typedef ValType::const_iterator Iterator;
explicit CopyBinding(const std::vector<bool>& val, explicit CopyBinding(const std::vector<bool>& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_deq(val.begin(), val.end()), _deq(val.begin(), val.end()),
_begin(), _begin(),
_end() _end()
@ -610,9 +610,9 @@ public:
typedef typename ValType::const_iterator Iterator; typedef typename ValType::const_iterator Iterator;
explicit Binding(std::list<T>& val, explicit Binding(std::list<T>& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_val(val), _val(val),
_begin(), _begin(),
_end() _end()
@ -675,9 +675,9 @@ public:
typedef typename ValType::const_iterator Iterator; typedef typename ValType::const_iterator Iterator;
explicit CopyBinding(ValType& val, explicit CopyBinding(ValType& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_pVal(new std::list<T>(val)), _pVal(new std::list<T>(val)),
_begin(), _begin(),
_end() _end()
@ -740,9 +740,9 @@ public:
typedef typename ValType::const_iterator Iterator; typedef typename ValType::const_iterator Iterator;
explicit Binding(std::deque<T>& val, explicit Binding(std::deque<T>& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_val(val), _val(val),
_begin(), _begin(),
_end() _end()
@ -805,9 +805,9 @@ public:
typedef typename ValType::const_iterator Iterator; typedef typename ValType::const_iterator Iterator;
explicit CopyBinding(std::deque<T>& val, explicit CopyBinding(std::deque<T>& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_pVal(new std::deque<T>(val)), _pVal(new std::deque<T>(val)),
_begin(), _begin(),
_end() _end()
@ -870,9 +870,9 @@ public:
typedef typename ValType::const_iterator Iterator; typedef typename ValType::const_iterator Iterator;
explicit Binding(std::set<T>& val, explicit Binding(std::set<T>& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_val(val), _val(val),
_begin(), _begin(),
_end() _end()
@ -935,9 +935,9 @@ public:
typedef typename ValType::const_iterator Iterator; typedef typename ValType::const_iterator Iterator;
explicit CopyBinding(std::set<T>& val, explicit CopyBinding(std::set<T>& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_pVal(new std::set<T>(val)), _pVal(new std::set<T>(val)),
_begin(), _begin(),
_end() _end()
@ -1000,9 +1000,9 @@ public:
typedef typename ValType::const_iterator Iterator; typedef typename ValType::const_iterator Iterator;
explicit Binding(std::multiset<T>& val, explicit Binding(std::multiset<T>& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_val(val), _val(val),
_begin(), _begin(),
_end() _end()
@ -1065,9 +1065,9 @@ public:
typedef typename ValType::const_iterator Iterator; typedef typename ValType::const_iterator Iterator;
explicit CopyBinding(std::multiset<T>& val, explicit CopyBinding(std::multiset<T>& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_pVal(new std::multiset<T>(val)), _pVal(new std::multiset<T>(val)),
_begin(), _begin(),
_end() _end()
@ -1130,9 +1130,9 @@ public:
typedef typename ValType::const_iterator Iterator; typedef typename ValType::const_iterator Iterator;
explicit Binding(std::map<K, V>& val, explicit Binding(std::map<K, V>& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_val(val), _val(val),
_begin(), _begin(),
_end() _end()
@ -1195,9 +1195,9 @@ public:
typedef typename ValType::const_iterator Iterator; typedef typename ValType::const_iterator Iterator;
explicit CopyBinding(std::map<K, V>& val, explicit CopyBinding(std::map<K, V>& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_pVal(new std::map<K, V>(val)), _pVal(new std::map<K, V>(val)),
_begin(), _begin(),
_end() _end()
@ -1260,9 +1260,9 @@ public:
typedef typename ValType::const_iterator Iterator; typedef typename ValType::const_iterator Iterator;
explicit Binding(std::multimap<K, V>& val, explicit Binding(std::multimap<K, V>& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_val(val), _val(val),
_begin(), _begin(),
_end() _end()
@ -1325,9 +1325,9 @@ public:
typedef typename ValType::const_iterator Iterator; typedef typename ValType::const_iterator Iterator;
explicit CopyBinding(std::multimap<K, V>& val, explicit CopyBinding(std::multimap<K, V>& val,
const std::string& name = "", const std::string& rName = "",
Direction direction = PD_IN): Direction direction = PD_IN):
AbstractBinding(name, direction), AbstractBinding(rName, direction),
_pVal(new std::multimap<K, V>(val)), _pVal(new std::multimap<K, V>(val)),
_begin(), _begin(),
_end() _end()

View File

@ -46,22 +46,22 @@ public:
typedef BulkExtraction<ValType> Type; typedef BulkExtraction<ValType> Type;
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
BulkExtraction(C& result, Poco::UInt32 limit, const Position& pos = Position(0)): BulkExtraction(C& rResult, Poco::UInt32 limit, const Position& pos = Position(0)):
AbstractExtraction(limit, pos.value(), true), AbstractExtraction(limit, pos.value(), true),
_rResult(result), _rResult(rResult),
_default() _default()
{ {
if (static_cast<Poco::UInt32>(result.size()) != limit) if (static_cast<Poco::UInt32>(rResult.size()) != limit)
result.resize(limit); rResult.resize(limit);
} }
BulkExtraction(C& result, const CValType& def, Poco::UInt32 limit, const Position& pos = Position(0)): BulkExtraction(C& rResult, const CValType& def, Poco::UInt32 limit, const Position& pos = Position(0)):
AbstractExtraction(limit, pos.value(), true), AbstractExtraction(limit, pos.value(), true),
_rResult(result), _rResult(rResult),
_default(def) _default(def)
{ {
if (static_cast<Poco::UInt32>(result.size()) != limit) if (static_cast<Poco::UInt32>(rResult.size()) != limit)
result.resize(limit); rResult.resize(limit);
} }
virtual ~BulkExtraction() virtual ~BulkExtraction()
@ -153,11 +153,11 @@ public:
typedef InternalBulkExtraction<ValType> Type; typedef InternalBulkExtraction<ValType> Type;
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
InternalBulkExtraction(C& result, InternalBulkExtraction(C& rResult,
Column<C>* pColumn, Column<C>* pColumn,
Poco::UInt32 limit, Poco::UInt32 limit,
const Position& pos = Position(0)): const Position& pos = Position(0)):
BulkExtraction<C>(result, CValType(), limit, pos), BulkExtraction<C>(rResult, CValType(), limit, pos),
_pColumn(pColumn) _pColumn(pColumn)
/// Creates InternalBulkExtraction. /// Creates InternalBulkExtraction.
{ {

View File

@ -393,16 +393,16 @@ public:
if (row <= (std::size_t) (_pData->size() / 2)) if (row <= (std::size_t) (_pData->size() / 2))
{ {
Iterator it = _pData->begin(); Iterator it = _pData->begin();
Iterator end = _pData->end(); Iterator itEnd = _pData->end();
for (int i = 0; it != end; ++it, ++i) for (int i = 0; it != itEnd; ++it, ++i)
if (i == row) return *it; if (i == row) return *it;
} }
else else
{ {
row = _pData->size() - row; row = _pData->size() - row;
RIterator it = _pData->rbegin(); RIterator it = _pData->rbegin();
RIterator end = _pData->rend(); RIterator itEnd = _pData->rend();
for (int i = 1; it != end; ++it, ++i) for (int i = 1; it != itEnd; ++it, ++i)
if (i == row) return *it; if (i == row) return *it;
} }

View File

@ -49,9 +49,9 @@ public:
typedef Extraction<ValType> Type; typedef Extraction<ValType> Type;
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
Extraction(T& result, const Position& pos = Position(0)): Extraction(T& rResult, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default(), _default(),
_extracted(false) _extracted(false)
/// Creates an Extraction object at specified position. /// Creates an Extraction object at specified position.
@ -59,9 +59,9 @@ public:
{ {
} }
Extraction(T& result, const T& def, const Position& pos = Position(0)): Extraction(T& rResult, const T& def, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default(def), _default(def),
_extracted(false) _extracted(false)
/// Creates an Extraction object at specified position. /// Creates an Extraction object at specified position.
@ -139,18 +139,18 @@ public:
typedef Extraction<ValType> Type; typedef Extraction<ValType> Type;
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
Extraction(std::vector<T>& result, const Position& pos = Position(0)): Extraction(std::vector<T>& rResult, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default() _default()
{ {
_rResult.clear(); _rResult.clear();
} }
Extraction(std::vector<T>& result, const T& def, const Position& pos = Position(0)): Extraction(std::vector<T>& rResult, const T& def, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default(def) _default(def)
{ {
_rResult.clear(); _rResult.clear();
@ -230,17 +230,17 @@ public:
typedef Extraction<ValType> Type; typedef Extraction<ValType> Type;
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
Extraction(std::vector<bool>& result, const Position& pos = Position(0)): Extraction(std::vector<bool>& rResult, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default() _default()
{ {
_rResult.clear(); _rResult.clear();
} }
Extraction(std::vector<bool>& result, const bool& def, const Position& pos = Position(0)): Extraction(std::vector<bool>& rResult, const bool& def, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default(def) _default(def)
{ {
_rResult.clear(); _rResult.clear();
@ -322,17 +322,17 @@ public:
typedef Extraction<ValType> Type; typedef Extraction<ValType> Type;
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
Extraction(std::list<T>& result, const Position& pos = Position(0)): Extraction(std::list<T>& rResult, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default() _default()
{ {
_rResult.clear(); _rResult.clear();
} }
Extraction(std::list<T>& result, const T& def, const Position& pos = Position(0)): Extraction(std::list<T>& rResult, const T& def, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default(def) _default(def)
{ {
_rResult.clear(); _rResult.clear();
@ -412,17 +412,17 @@ public:
typedef Extraction<ValType> Type; typedef Extraction<ValType> Type;
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
Extraction(std::deque<T>& result, const Position& pos = Position(0)): Extraction(std::deque<T>& rResult, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default() _default()
{ {
_rResult.clear(); _rResult.clear();
} }
Extraction(std::deque<T>& result, const T& def, const Position& pos = Position(0)): Extraction(std::deque<T>& rResult, const T& def, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default(def) _default(def)
{ {
_rResult.clear(); _rResult.clear();
@ -511,8 +511,8 @@ public:
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
InternalExtraction(C& result, Column<C>* pColumn, const Position& pos = Position(0)): InternalExtraction(C& rResult, Column<C>* pColumn, const Position& pos = Position(0)):
Extraction<C>(result, ValType(), pos), Extraction<C>(rResult, ValType(), pos),
_pColumn(pColumn) _pColumn(pColumn)
/// Creates InternalExtraction. /// Creates InternalExtraction.
{ {
@ -572,17 +572,17 @@ public:
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
typedef typename ValType::iterator Iterator; typedef typename ValType::iterator Iterator;
Extraction(std::set<T>& result, const Position& pos = Position(0)): Extraction(std::set<T>& rResult, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default() _default()
{ {
_rResult.clear(); _rResult.clear();
} }
Extraction(std::set<T>& result, const T& def, const Position& pos = Position(0)): Extraction(std::set<T>& rResult, const T& def, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default(def) _default(def)
{ {
_rResult.clear(); _rResult.clear();
@ -636,17 +636,17 @@ public:
typedef Extraction<ValType> Type; typedef Extraction<ValType> Type;
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
Extraction(std::multiset<T>& result, const Position& pos = Position(0)): Extraction(std::multiset<T>& rResult, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default() _default()
{ {
_rResult.clear(); _rResult.clear();
} }
Extraction(std::multiset<T>& result, const T& def, const Position& pos = Position(0)): Extraction(std::multiset<T>& rResult, const T& def, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default(def) _default(def)
{ {
_rResult.clear(); _rResult.clear();
@ -700,17 +700,17 @@ public:
typedef Extraction<ValType> Type; typedef Extraction<ValType> Type;
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
Extraction(std::map<K, V>& result, const Position& pos = Position(0)): Extraction(std::map<K, V>& rResult, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default() _default()
{ {
_rResult.clear(); _rResult.clear();
} }
Extraction(std::map<K, V>& result, const V& def, const Position& pos = Position(0)): Extraction(std::map<K, V>& rResult, const V& def, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default(def) _default(def)
{ {
_rResult.clear(); _rResult.clear();
@ -764,17 +764,17 @@ public:
typedef Extraction<ValType> Type; typedef Extraction<ValType> Type;
typedef SharedPtr<Type> Ptr; typedef SharedPtr<Type> Ptr;
Extraction(std::multimap<K, V>& result, const Position& pos = Position(0)): Extraction(std::multimap<K, V>& rResult, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default() _default()
{ {
_rResult.clear(); _rResult.clear();
} }
Extraction(std::multimap<K, V>& result, const V& def, const Position& pos = Position(0)): Extraction(std::multimap<K, V>& rResult, const V& def, const Position& pos = Position(0)):
AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()), AbstractExtraction(Limit::LIMIT_UNLIMITED, pos.value()),
_rResult(result), _rResult(rResult),
_default(def) _default(def)
{ {
_rResult.clear(); _rResult.clear();

View File

@ -53,20 +53,20 @@ public:
{ {
} }
LOB(const std::vector<T>& content): LOB(const std::vector<T>& rContent):
_pContent(new std::vector<T>(content)) _pContent(new std::vector<T>(rContent))
/// Creates the LOB, content is deep-copied. /// Creates the LOB, content is deep-copied.
{ {
} }
LOB(const T* const pContent, std::size_t size): LOB(const T* const pContent, std::size_t objectSize):
_pContent(new std::vector<T>(pContent, pContent + size)) _pContent(new std::vector<T>(pContent, pContent + objectSize))
/// Creates the LOB by deep-copying pContent. /// Creates the LOB by deep-copying pContent.
{ {
} }
LOB(const std::basic_string<T>& content): LOB(const std::basic_string<T>& rContent):
_pContent(new std::vector<T>(content.begin(), content.end())) _pContent(new std::vector<T>(rContent.begin(), rContent.end()))
/// Creates a LOB from a string. /// Creates a LOB from a string.
{ {
} }

View File

@ -154,27 +154,27 @@ inline bool MetaColumn::isNullable() const
} }
inline void MetaColumn::setName(const std::string& name) inline void MetaColumn::setName(const std::string& rName)
{ {
_name = name; _name = rName;
} }
inline void MetaColumn::setLength(std::size_t length) inline void MetaColumn::setLength(std::size_t columnLength)
{ {
_length = length; _length = columnLength;
} }
inline void MetaColumn::setPrecision(std::size_t precision) inline void MetaColumn::setPrecision(std::size_t columnPrecision)
{ {
_precision = precision; _precision = columnPrecision;
} }
inline void MetaColumn::setType(ColumnDataType type) inline void MetaColumn::setType(ColumnDataType columnType)
{ {
_type = type; _type = columnType;
} }

View File

@ -191,10 +191,10 @@ public:
/// Rows are lazy-created and cached. /// Rows are lazy-created and cached.
template <class T> template <class T>
const T& value(std::size_t col, std::size_t row, bool useFilter = true) const const T& value(std::size_t col, std::size_t dataRow, bool useFilter = true) const
/// Returns the reference to data value at [col, row] location. /// Returns the reference to data value at [col, row] location.
{ {
if (useFilter && isFiltered() && !isAllowed(row)) if (useFilter && isFiltered() && !isAllowed(dataRow))
throw InvalidAccessException("Row not allowed"); throw InvalidAccessException("Row not allowed");
switch (storage()) switch (storage())
@ -202,18 +202,18 @@ public:
case STORAGE_VECTOR: case STORAGE_VECTOR:
{ {
typedef typename std::vector<T> C; typedef typename std::vector<T> C;
return column<C>(col).value(row); return column<C>(col).value(dataRow);
} }
case STORAGE_LIST: case STORAGE_LIST:
{ {
typedef typename std::list<T> C; typedef typename std::list<T> C;
return column<C>(col).value(row); return column<C>(col).value(dataRow);
} }
case STORAGE_DEQUE: case STORAGE_DEQUE:
case STORAGE_UNKNOWN: case STORAGE_UNKNOWN:
{ {
typedef typename std::deque<T> C; typedef typename std::deque<T> C;
return column<C>(col).value(row); return column<C>(col).value(dataRow);
} }
default: default:
throw IllegalStateException("Invalid storage setting."); throw IllegalStateException("Invalid storage setting.");
@ -221,10 +221,10 @@ public:
} }
template <class T> template <class T>
const T& value(const std::string& name, std::size_t row, bool useFilter = true) const const T& value(const std::string& name, std::size_t dataRow, bool useFilter = true) const
/// Returns the reference to data value at named column, row location. /// Returns the reference to data value at named column, row location.
{ {
if (useFilter && isFiltered() && !isAllowed(row)) if (useFilter && isFiltered() && !isAllowed(dataRow))
throw InvalidAccessException("Row not allowed"); throw InvalidAccessException("Row not allowed");
switch (storage()) switch (storage())
@ -232,18 +232,18 @@ public:
case STORAGE_VECTOR: case STORAGE_VECTOR:
{ {
typedef typename std::vector<T> C; typedef typename std::vector<T> C;
return column<C>(name).value(row); return column<C>(name).value(dataRow);
} }
case STORAGE_LIST: case STORAGE_LIST:
{ {
typedef typename std::list<T> C; typedef typename std::list<T> C;
return column<C>(name).value(row); return column<C>(name).value(dataRow);
} }
case STORAGE_DEQUE: case STORAGE_DEQUE:
case STORAGE_UNKNOWN: case STORAGE_UNKNOWN:
{ {
typedef typename std::deque<T> C; typedef typename std::deque<T> C;
return column<C>(name).value(row); return column<C>(name).value(dataRow);
} }
default: default:
throw IllegalStateException("Invalid storage setting."); throw IllegalStateException("Invalid storage setting.");
@ -402,9 +402,9 @@ private:
const AbstractExtractionVec& rExtractions = extractions(); const AbstractExtractionVec& rExtractions = extractions();
AbstractExtractionVec::const_iterator it = rExtractions.begin(); AbstractExtractionVec::const_iterator it = rExtractions.begin();
AbstractExtractionVec::const_iterator end = rExtractions.end(); AbstractExtractionVec::const_iterator itEnd = rExtractions.end();
for (; it != end; ++it) for (; it != itEnd; ++it)
{ {
ExtractionVecPtr pExtraction = dynamic_cast<ExtractionVecPtr>(it->get()); ExtractionVecPtr pExtraction = dynamic_cast<ExtractionVecPtr>(it->get());
@ -505,9 +505,9 @@ inline std::size_t RecordSet::totalRowCount() const
} }
inline void RecordSet::setTotalRowCount(std::size_t totalRowCount) inline void RecordSet::setTotalRowCount(std::size_t count)
{ {
_totalRowCount = totalRowCount; _totalRowCount = count;
} }

View File

@ -184,15 +184,15 @@ inline void RowFormatter::setTotalRowCount(int count)
} }
inline void RowFormatter::setPrefix(const std::string& prefix) inline void RowFormatter::setPrefix(const std::string& rPrefix)
{ {
_prefix = prefix; _prefix = rPrefix;
} }
inline void RowFormatter::setPostfix(const std::string& postfix) inline void RowFormatter::setPostfix(const std::string& rPostfix)
{ {
_postfix = postfix; _postfix = rPostfix;
} }

View File

@ -96,7 +96,7 @@ public:
/// is thrown. /// is thrown.
template <typename T> template <typename T>
Session get(const std::string& name, const T& value) Session get(const std::string& rName, const T& value)
/// Returns a Session with requested property set. /// Returns a Session with requested property set.
/// The property can be different from the default pool /// The property can be different from the default pool
/// value, in which case it is reset back to the pool /// value, in which case it is reset back to the pool
@ -104,8 +104,8 @@ public:
{ {
Session s = get(); Session s = get();
_addPropertyMap.insert(AddPropertyMap::value_type(s.impl(), _addPropertyMap.insert(AddPropertyMap::value_type(s.impl(),
std::make_pair(name, s.getProperty(name)))); std::make_pair(rName, s.getProperty(rName))));
s.setProperty(name, value); s.setProperty(rName, value);
return s; return s;
} }

View File

@ -147,10 +147,10 @@ public:
/// Registers the Binding vector with the Statement. /// Registers the Binding vector with the Statement.
template <typename C> template <typename C>
Statement& addBinding(C& bindingCont, bool reset) Statement& addBinding(C& bindingCont, bool doReset)
/// Registers binding container with the Statement. /// Registers binding container with the Statement.
{ {
if (reset) _pImpl->resetBinding(); if (doReset) _pImpl->resetBinding();
typename C::iterator itAB = bindingCont.begin(); typename C::iterator itAB = bindingCont.begin();
typename C::iterator itABEnd = bindingCont.end(); typename C::iterator itABEnd = bindingCont.end();
for (; itAB != itABEnd; ++itAB) addBind(*itAB); for (; itAB != itABEnd; ++itAB) addBind(*itAB);
@ -169,10 +169,10 @@ public:
/// Registers the vector of extraction vectors with the Statement. /// Registers the vector of extraction vectors with the Statement.
template <typename C> template <typename C>
Statement& addExtraction(C& val, bool reset) Statement& addExtraction(C& val, bool doReset)
/// Registers extraction container with the Statement. /// Registers extraction container with the Statement.
{ {
if (reset) _pImpl->resetExtraction(); if (doReset) _pImpl->resetExtraction();
typename C::iterator itAE = val.begin(); typename C::iterator itAE = val.begin();
typename C::iterator itAEEnd = val.end(); typename C::iterator itAEEnd = val.end();
for (; itAE != itAEEnd; ++itAE) addExtract(*itAE); for (; itAE != itAEEnd; ++itAE) addExtract(*itAE);
@ -680,9 +680,9 @@ inline const MetaColumn& Statement::metaColumn(const std::string& name) const
} }
inline void Statement::setStorage(const std::string& storage) inline void Statement::setStorage(const std::string& rStorage)
{ {
_pImpl->setStorage(storage); _pImpl->setStorage(rStorage);
} }

View File

@ -21,13 +21,13 @@ namespace Poco {
namespace Data { namespace Data {
AbstractBinding::AbstractBinding(const std::string& name, AbstractBinding::AbstractBinding(const std::string& rName,
Direction direction, Direction direction,
Poco::UInt32 bulkSize): Poco::UInt32 bindingBulkSize):
_pBinder(0), _pBinder(0),
_name(name), _name(rName),
_direction(direction), _direction(direction),
_bulkSize(bulkSize) _bulkSize(bindingBulkSize)
{ {
} }

View File

@ -22,11 +22,11 @@ namespace Data {
AbstractExtraction::AbstractExtraction(Poco::UInt32 limit, AbstractExtraction::AbstractExtraction(Poco::UInt32 limit,
Poco::UInt32 position, Poco::UInt32 extractionPosition,
bool bulk): bool bulk):
_pExtractor(0), _pExtractor(0),
_limit(limit), _limit(limit),
_position(position), _position(extractionPosition),
_bulk(bulk), _bulk(bulk),
_emptyStringIsNull(false), _emptyStringIsNull(false),
_forceEmptyString(false) _forceEmptyString(false)

View File

@ -21,7 +21,7 @@ namespace Poco {
namespace Data { namespace Data {
Bulk::Bulk(const Limit& limit): _limit(limit.value(), false, false) Bulk::Bulk(const Limit& rLimit): _limit(rLimit.value(), false, false)
{ {
} }

View File

@ -37,9 +37,9 @@ Date::Date()
} }
Date::Date(int year, int month, int day) Date::Date(int dateYear, int dateMonth, int dateDay)
{ {
assign(year, month, day); assign(dateYear, dateMonth, dateDay);
} }
@ -54,36 +54,36 @@ Date::~Date()
} }
void Date::assign(int year, int month, int day) void Date::assign(int dateYear, int dateMonth, int dateDay)
{ {
if (year < 0 || year > 9999) if (dateYear < 0 || dateYear > 9999)
throw InvalidArgumentException("Year must be between 0 and 9999"); throw InvalidArgumentException("Year must be between 0 and 9999");
if (month < 1 || month > 12) if (dateMonth < 1 || dateMonth > 12)
throw InvalidArgumentException("Month must be between 1 and 12"); throw InvalidArgumentException("Month must be between 1 and 12");
if (day < 1 || day > DateTime::daysOfMonth(year, month)) if (dateDay < 1 || dateDay > DateTime::daysOfMonth(dateYear, dateMonth))
throw InvalidArgumentException("Month must be between 1 and " + throw InvalidArgumentException("Month must be between 1 and " +
NumberFormatter::format(DateTime::daysOfMonth(year, month))); NumberFormatter::format(DateTime::daysOfMonth(dateYear, dateMonth)));
_year = year; _year = dateYear;
_month = month; _month = dateMonth;
_day = day; _day = dateDay;
} }
bool Date::operator < (const Date& date) const bool Date::operator < (const Date& date) const
{ {
int year = date.year(); int dateYear = date.year();
if (_year < year) return true; if (_year < dateYear) return true;
else if (_year > year) return false; else if (_year > dateYear) return false;
else // years equal else // years equal
{ {
int month = date.month(); int dateMonth = date.month();
if (_month < month) return true; if (_month < dateMonth) return true;
else else
if (_month > month) return false; if (_month > dateMonth) return false;
else // months equal else // months equal
if (_day < date.day()) return true; if (_day < date.day()) return true;
} }

View File

@ -21,10 +21,10 @@ namespace Poco {
namespace Data { namespace Data {
Limit::Limit(SizeT value, bool hardLimit, bool isLowerLimit) : Limit::Limit(SizeT limitValue, bool hardLimit, bool lowerLimit) :
_value(value), _value(limitValue),
_hardLimit(hardLimit), _hardLimit(hardLimit),
_isLowerLimit(isLowerLimit) _isLowerLimit(lowerLimit)
{ {
} }

View File

@ -26,17 +26,17 @@ MetaColumn::MetaColumn()
} }
MetaColumn::MetaColumn(std::size_t position, MetaColumn::MetaColumn(std::size_t columnPosition,
const std::string& name, const std::string& rName,
ColumnDataType type, ColumnDataType columnType,
std::size_t length, std::size_t columnLength,
std::size_t precision, std::size_t columnPrecision,
bool nullable): bool nullable):
_name(name), _name(rName),
_length(length), _length(columnLength),
_precision(precision), _precision(columnPrecision),
_position(position), _position(columnPosition),
_type(type), _type(columnType),
_nullable(nullable) _nullable(nullable)
{ {
} }

View File

@ -21,8 +21,8 @@ namespace Poco {
namespace Data { namespace Data {
PooledSessionHolder::PooledSessionHolder(SessionPool& owner, SessionImpl* pSessionImpl): PooledSessionHolder::PooledSessionHolder(SessionPool& rOwner, SessionImpl* pSessionImpl):
_owner(owner), _owner(rOwner),
_pImpl(pSessionImpl, true) _pImpl(pSessionImpl, true)
{ {
} }

View File

@ -21,7 +21,7 @@ namespace Poco {
namespace Data { namespace Data {
Position::Position(Poco::UInt32 value): _value(value) Position::Position(Poco::UInt32 positionValue): _value(positionValue)
{ {
} }

View File

@ -82,8 +82,8 @@ RecordSet::~RecordSet()
if(_pFilter) _pFilter->release(); if(_pFilter) _pFilter->release();
RowMap::iterator it = _rowMap.begin(); RowMap::iterator it = _rowMap.begin();
RowMap::iterator end = _rowMap.end(); RowMap::iterator itEnd = _rowMap.end();
for (; it != end; ++it) delete it->second; for (; it != itEnd; ++it) delete it->second;
} }
catch (...) catch (...)
{ {
@ -92,65 +92,65 @@ RecordSet::~RecordSet()
} }
Poco::Dynamic::Var RecordSet::value(std::size_t col, std::size_t row, bool useFilter) const Poco::Dynamic::Var RecordSet::value(std::size_t col, std::size_t dataRow, bool useFilter) const
{ {
if (useFilter && isFiltered() && !isAllowed(row)) if (useFilter && isFiltered() && !isAllowed(dataRow))
throw InvalidAccessException("Row not allowed"); throw InvalidAccessException("Row not allowed");
if (isNull(col, row)) return Poco::Dynamic::Var(); if (isNull(col, dataRow)) return Poco::Dynamic::Var();
switch (columnType(col)) switch (columnType(col))
{ {
case MetaColumn::FDT_BOOL: return value<bool>(col, row, useFilter); case MetaColumn::FDT_BOOL: return value<bool>(col, dataRow, useFilter);
case MetaColumn::FDT_INT8: return value<Int8>(col, row, useFilter); case MetaColumn::FDT_INT8: return value<Int8>(col, dataRow, useFilter);
case MetaColumn::FDT_UINT8: return value<UInt8>(col, row, useFilter); case MetaColumn::FDT_UINT8: return value<UInt8>(col, dataRow, useFilter);
case MetaColumn::FDT_INT16: return value<Int16>(col, row, useFilter); case MetaColumn::FDT_INT16: return value<Int16>(col, dataRow, useFilter);
case MetaColumn::FDT_UINT16: return value<UInt16>(col, row, useFilter); case MetaColumn::FDT_UINT16: return value<UInt16>(col, dataRow, useFilter);
case MetaColumn::FDT_INT32: return value<Int32>(col, row, useFilter); case MetaColumn::FDT_INT32: return value<Int32>(col, dataRow, useFilter);
case MetaColumn::FDT_UINT32: return value<UInt32>(col, row, useFilter); case MetaColumn::FDT_UINT32: return value<UInt32>(col, dataRow, useFilter);
case MetaColumn::FDT_INT64: return value<Int64>(col, row, useFilter); case MetaColumn::FDT_INT64: return value<Int64>(col, dataRow, useFilter);
case MetaColumn::FDT_UINT64: return value<UInt64>(col, row, useFilter); case MetaColumn::FDT_UINT64: return value<UInt64>(col, dataRow, useFilter);
case MetaColumn::FDT_FLOAT: return value<float>(col, row, useFilter); case MetaColumn::FDT_FLOAT: return value<float>(col, dataRow, useFilter);
case MetaColumn::FDT_DOUBLE: return value<double>(col, row, useFilter); case MetaColumn::FDT_DOUBLE: return value<double>(col, dataRow, useFilter);
case MetaColumn::FDT_STRING: return value<std::string>(col, row, useFilter); case MetaColumn::FDT_STRING: return value<std::string>(col, dataRow, useFilter);
case MetaColumn::FDT_WSTRING: return value<UTF16String>(col, row, useFilter); case MetaColumn::FDT_WSTRING: return value<UTF16String>(col, dataRow, useFilter);
case MetaColumn::FDT_BLOB: return value<BLOB>(col, row, useFilter); case MetaColumn::FDT_BLOB: return value<BLOB>(col, dataRow, useFilter);
case MetaColumn::FDT_CLOB: return value<CLOB>(col, row, useFilter); case MetaColumn::FDT_CLOB: return value<CLOB>(col, dataRow, useFilter);
case MetaColumn::FDT_DATE: return value<Date>(col, row, useFilter); case MetaColumn::FDT_DATE: return value<Date>(col, dataRow, useFilter);
case MetaColumn::FDT_TIME: return value<Time>(col, row, useFilter); case MetaColumn::FDT_TIME: return value<Time>(col, dataRow, useFilter);
case MetaColumn::FDT_TIMESTAMP: return value<DateTime>(col, row); case MetaColumn::FDT_TIMESTAMP: return value<DateTime>(col, dataRow);
default: default:
throw UnknownTypeException("Data type not supported."); throw UnknownTypeException("Data type not supported.");
} }
} }
Poco::Dynamic::Var RecordSet::value(const std::string& name, std::size_t row, bool useFilter) const Poco::Dynamic::Var RecordSet::value(const std::string& name, std::size_t dataRow, bool useFilter) const
{ {
if (useFilter && isFiltered() && !isAllowed(row)) if (useFilter && isFiltered() && !isAllowed(dataRow))
throw InvalidAccessException("Row not allowed"); throw InvalidAccessException("Row not allowed");
if (isNull(metaColumn(name).position(), row)) return Poco::Dynamic::Var(); if (isNull(metaColumn(name).position(), dataRow)) return Poco::Dynamic::Var();
switch (columnType(name)) switch (columnType(name))
{ {
case MetaColumn::FDT_BOOL: return value<bool>(name, row, useFilter); case MetaColumn::FDT_BOOL: return value<bool>(name, dataRow, useFilter);
case MetaColumn::FDT_INT8: return value<Int8>(name, row, useFilter); case MetaColumn::FDT_INT8: return value<Int8>(name, dataRow, useFilter);
case MetaColumn::FDT_UINT8: return value<UInt8>(name, row, useFilter); case MetaColumn::FDT_UINT8: return value<UInt8>(name, dataRow, useFilter);
case MetaColumn::FDT_INT16: return value<Int16>(name, row, useFilter); case MetaColumn::FDT_INT16: return value<Int16>(name, dataRow, useFilter);
case MetaColumn::FDT_UINT16: return value<UInt16>(name, row, useFilter); case MetaColumn::FDT_UINT16: return value<UInt16>(name, dataRow, useFilter);
case MetaColumn::FDT_INT32: return value<Int32>(name, row, useFilter); case MetaColumn::FDT_INT32: return value<Int32>(name, dataRow, useFilter);
case MetaColumn::FDT_UINT32: return value<UInt32>(name, row, useFilter); case MetaColumn::FDT_UINT32: return value<UInt32>(name, dataRow, useFilter);
case MetaColumn::FDT_INT64: return value<Int64>(name, row, useFilter); case MetaColumn::FDT_INT64: return value<Int64>(name, dataRow, useFilter);
case MetaColumn::FDT_UINT64: return value<UInt64>(name, row, useFilter); case MetaColumn::FDT_UINT64: return value<UInt64>(name, dataRow, useFilter);
case MetaColumn::FDT_FLOAT: return value<float>(name, row, useFilter); case MetaColumn::FDT_FLOAT: return value<float>(name, dataRow, useFilter);
case MetaColumn::FDT_DOUBLE: return value<double>(name, row, useFilter); case MetaColumn::FDT_DOUBLE: return value<double>(name, dataRow, useFilter);
case MetaColumn::FDT_STRING: return value<std::string>(name, row, useFilter); case MetaColumn::FDT_STRING: return value<std::string>(name, dataRow, useFilter);
case MetaColumn::FDT_WSTRING: return value<UTF16String>(name, row, useFilter); case MetaColumn::FDT_WSTRING: return value<UTF16String>(name, dataRow, useFilter);
case MetaColumn::FDT_BLOB: return value<BLOB>(name, row, useFilter); case MetaColumn::FDT_BLOB: return value<BLOB>(name, dataRow, useFilter);
case MetaColumn::FDT_DATE: return value<Date>(name, row, useFilter); case MetaColumn::FDT_DATE: return value<Date>(name, dataRow, useFilter);
case MetaColumn::FDT_TIME: return value<Time>(name, row, useFilter); case MetaColumn::FDT_TIME: return value<Time>(name, dataRow, useFilter);
case MetaColumn::FDT_TIMESTAMP: return value<DateTime>(name, row, useFilter); case MetaColumn::FDT_TIMESTAMP: return value<DateTime>(name, dataRow, useFilter);
default: default:
throw UnknownTypeException("Data type not supported."); throw UnknownTypeException("Data type not supported.");
} }
@ -205,19 +205,19 @@ std::size_t RecordSet::rowCount() const
if (!isFiltered()) return rc; if (!isFiltered()) return rc;
std::size_t counter = 0; std::size_t counter = 0;
for (int row = 0; row < rc; ++row) for (int dataRow = 0; dataRow < rc; ++dataRow)
{ {
if (isAllowed(row)) ++counter; if (isAllowed(dataRow)) ++counter;
} }
return counter; return counter;
} }
bool RecordSet::isAllowed(std::size_t row) const bool RecordSet::isAllowed(std::size_t dataRow) const
{ {
if (!isFiltered()) return true; if (!isFiltered()) return true;
return _pFilter->isAllowed(row); return _pFilter->isAllowed(dataRow);
} }
@ -308,8 +308,8 @@ void RecordSet::setRowFormatter(RowFormatter::Ptr pRowFormatter)
Statement::setRowFormatter(pRowFormatter); Statement::setRowFormatter(pRowFormatter);
RowMap::iterator it = _rowMap.begin(); RowMap::iterator it = _rowMap.begin();
RowMap::iterator end = _rowMap.end(); RowMap::iterator itEnd = _rowMap.end();
for (; it != end; ++it) it->second->setFormatter(getRowFormatter()); for (; it != itEnd; ++it) it->second->setFormatter(getRowFormatter());
} }
else else
throw NullPointerException("Null RowFormatter in RecordSet."); throw NullPointerException("Null RowFormatter in RecordSet.");
@ -331,8 +331,8 @@ std::ostream& RecordSet::copyValues(std::ostream& os, std::size_t offset, std::s
if (begin() == end()) return os; if (begin() == end()) return os;
RowIterator it = *_pBegin + offset; RowIterator it = *_pBegin + offset;
RowIterator end = (RowIterator::POSITION_END != length) ? it + length : *_pEnd; RowIterator itEnd = (RowIterator::POSITION_END != length) ? it + length : *_pEnd;
std::copy(it, end, std::ostream_iterator<Row>(os)); std::copy(it, itEnd, std::ostream_iterator<Row>(os));
return os; return os;
} }
@ -342,9 +342,9 @@ void RecordSet::formatValues(std::size_t offset, std::size_t length) const
if (begin() == end()) return; if (begin() == end()) return;
RowIterator it = *_pBegin + offset; RowIterator it = *_pBegin + offset;
RowIterator end = (RowIterator::POSITION_END != length) ? it + length : *_pEnd; RowIterator itEnd = (RowIterator::POSITION_END != length) ? it + length : *_pEnd;
std::string val; std::string val;
for (; it != end; ++it) it->formatValues(); for (; it != itEnd; ++it) it->formatValues();
} }

View File

@ -23,11 +23,11 @@ namespace Poco {
namespace Data { namespace Data {
RowFormatter::RowFormatter(const std::string& prefix, RowFormatter::RowFormatter(const std::string& rPrefix,
const std::string& postfix, const std::string& rPostfix,
Mode mode): Mode mode):
_prefix(prefix), _prefix(rPrefix),
_postfix(postfix), _postfix(rPostfix),
_mode(mode), _mode(mode),
_totalRowCount(0) _totalRowCount(0)
{ {

View File

@ -33,11 +33,11 @@ Session::Session(Poco::AutoPtr<SessionImpl> pImpl):
} }
Session::Session(const std::string& connector, Session::Session(const std::string& rConnector,
const std::string& connectionString, const std::string& connectionString,
std::size_t timeout) std::size_t timeout)
{ {
Session newSession(SessionFactory::instance().create(connector, connectionString, timeout)); Session newSession(SessionFactory::instance().create(rConnector, connectionString, timeout));
swap(newSession); swap(newSession);
} }

View File

@ -22,8 +22,8 @@ namespace Poco {
namespace Data { namespace Data {
SessionImpl::SessionImpl(const std::string& connectionString, std::size_t timeout): SessionImpl::SessionImpl(const std::string& rConnectionString, std::size_t timeout):
_connectionString(connectionString), _connectionString(rConnectionString),
_loginTimeout(timeout) _loginTimeout(timeout)
{ {
} }
@ -41,13 +41,13 @@ void SessionImpl::reconnect()
} }
void SessionImpl::setConnectionString(const std::string& connectionString) void SessionImpl::setConnectionString(const std::string& rConnectionString)
{ {
if (isConnected()) if (isConnected())
throw Poco::InvalidAccessException("Can not change connection string on connected session." throw Poco::InvalidAccessException("Can not change connection string on connected session."
" Close the session first."); " Close the session first.");
_connectionString = connectionString; _connectionString = rConnectionString;
} }

View File

@ -52,12 +52,12 @@ SessionPool::~SessionPool()
} }
Session SessionPool::get(const std::string& name, bool value) Session SessionPool::get(const std::string& rName, bool value)
{ {
Session s = get(); Session s = get();
_addFeatureMap.insert(AddFeatureMap::value_type(s.impl(), _addFeatureMap.insert(AddFeatureMap::value_type(s.impl(),
std::make_pair(name, s.getFeature(name)))); std::make_pair(rName, s.getFeature(rName))));
s.setFeature(name, value); s.setFeature(rName, value);
return s; return s;
} }
@ -163,7 +163,7 @@ int SessionPool::available() const
} }
void SessionPool::setFeature(const std::string& name, bool state) void SessionPool::setFeature(const std::string& rName, bool state)
{ {
Poco::Mutex::ScopedLock lock(_mutex); Poco::Mutex::ScopedLock lock(_mutex);
if (_shutdown) throw InvalidAccessException("Session pool has been shut down."); if (_shutdown) throw InvalidAccessException("Session pool has been shut down.");
@ -171,23 +171,23 @@ void SessionPool::setFeature(const std::string& name, bool state)
if (_nSessions > 0) if (_nSessions > 0)
throw InvalidAccessException("Features can not be set after the first session was created."); throw InvalidAccessException("Features can not be set after the first session was created.");
_featureMap.insert(FeatureMap::ValueType(name, state)); _featureMap.insert(FeatureMap::ValueType(rName, state));
} }
bool SessionPool::getFeature(const std::string& name) bool SessionPool::getFeature(const std::string& rName)
{ {
FeatureMap::ConstIterator it = _featureMap.find(name); FeatureMap::ConstIterator it = _featureMap.find(rName);
if (_shutdown) throw InvalidAccessException("Session pool has been shut down."); if (_shutdown) throw InvalidAccessException("Session pool has been shut down.");
if (_featureMap.end() == it) if (_featureMap.end() == it)
throw NotFoundException("Feature not found:" + name); throw NotFoundException("Feature not found:" + rName);
return it->second; return it->second;
} }
void SessionPool::setProperty(const std::string& name, const Poco::Any& value) void SessionPool::setProperty(const std::string& rName, const Poco::Any& value)
{ {
Poco::Mutex::ScopedLock lock(_mutex); Poco::Mutex::ScopedLock lock(_mutex);
if (_shutdown) throw InvalidAccessException("Session pool has been shut down."); if (_shutdown) throw InvalidAccessException("Session pool has been shut down.");
@ -195,16 +195,16 @@ void SessionPool::setProperty(const std::string& name, const Poco::Any& value)
if (_nSessions > 0) if (_nSessions > 0)
throw InvalidAccessException("Properties can not be set after first session was created."); throw InvalidAccessException("Properties can not be set after first session was created.");
_propertyMap.insert(PropertyMap::ValueType(name, value)); _propertyMap.insert(PropertyMap::ValueType(rName, value));
} }
Poco::Any SessionPool::getProperty(const std::string& name) Poco::Any SessionPool::getProperty(const std::string& rName)
{ {
PropertyMap::ConstIterator it = _propertyMap.find(name); PropertyMap::ConstIterator it = _propertyMap.find(rName);
if (_propertyMap.end() == it) if (_propertyMap.end() == it)
throw NotFoundException("Property not found:" + name); throw NotFoundException("Property not found:" + rName);
return it->second; return it->second;
} }

View File

@ -37,10 +37,10 @@ Statement::Statement(StatementImpl::Ptr pImpl):
} }
Statement::Statement(Session& session): Statement::Statement(Session& rSession):
_async(false) _async(false)
{ {
reset(session); reset(rSession);
} }
@ -81,15 +81,15 @@ void Statement::swap(Statement& other)
} }
Statement& Statement::reset(Session& session) Statement& Statement::reset(Session& rSession)
{ {
Statement stmt(session.createStatementImpl()); Statement stmt(rSession.createStatementImpl());
swap(stmt); swap(stmt);
return *this; return *this;
} }
std::size_t Statement::execute(bool reset) std::size_t Statement::execute(bool doReset)
{ {
Mutex::ScopedLock lock(_mutex); Mutex::ScopedLock lock(_mutex);
bool isDone = done(); bool isDone = done();
@ -104,7 +104,7 @@ std::size_t Statement::execute(bool reset)
if (!isAsync()) if (!isAsync())
{ {
if (isDone) _pImpl->reset(); if (isDone) _pImpl->reset();
return _pImpl->execute(reset); return _pImpl->execute(doReset);
} }
else else
{ {
@ -116,22 +116,22 @@ std::size_t Statement::execute(bool reset)
} }
const Statement::Result& Statement::executeAsync(bool reset) const Statement::Result& Statement::executeAsync(bool doReset)
{ {
Mutex::ScopedLock lock(_mutex); Mutex::ScopedLock lock(_mutex);
if (initialized() || paused() || done()) if (initialized() || paused() || done())
return doAsyncExec(reset); return doAsyncExec(doReset);
else else
throw InvalidAccessException("Statement still executing."); throw InvalidAccessException("Statement still executing.");
} }
const Statement::Result& Statement::doAsyncExec(bool reset) const Statement::Result& Statement::doAsyncExec(bool doReset)
{ {
if (done()) _pImpl->reset(); if (done()) _pImpl->reset();
if (!_pAsyncExec) if (!_pAsyncExec)
_pAsyncExec = new AsyncExecMethod(_pImpl, &StatementImpl::execute); _pAsyncExec = new AsyncExecMethod(_pImpl, &StatementImpl::execute);
_pResult = new Result((*_pAsyncExec)(reset)); _pResult = new Result((*_pAsyncExec)(doReset));
return *_pResult; return *_pResult;
} }

View File

@ -69,9 +69,9 @@ StatementImpl::~StatementImpl()
} }
std::size_t StatementImpl::execute(const bool& reset) std::size_t StatementImpl::execute(const bool& rReset)
{ {
if (reset) resetExtraction(); if (rReset) resetExtraction();
if (!_rSession.isConnected()) if (!_rSession.isConnected())
{ {
@ -98,13 +98,13 @@ std::size_t StatementImpl::execute(const bool& reset)
if (lim < _lowerLimit) if (lim < _lowerLimit)
throw LimitException("Did not receive enough data."); throw LimitException("Did not receive enough data.");
assignSubTotal(reset); assignSubTotal(rReset);
return lim; return lim;
} }
void StatementImpl::assignSubTotal(bool reset) void StatementImpl::assignSubTotal(bool doReset)
{ {
if (_extractors.size() == _subTotalRowCount.size()) if (_extractors.size() == _subTotalRowCount.size())
{ {
@ -114,7 +114,7 @@ void StatementImpl::assignSubTotal(bool reset)
{ {
if (_extractors[counter].size()) if (_extractors[counter].size())
{ {
if (reset) if (doReset)
*it += CountVec::value_type(_extractors[counter][0]->numOfRowsHandled()); *it += CountVec::value_type(_extractors[counter][0]->numOfRowsHandled());
else else
*it = CountVec::value_type(_extractors[counter][0]->numOfRowsHandled()); *it = CountVec::value_type(_extractors[counter][0]->numOfRowsHandled());

View File

@ -35,9 +35,9 @@ Time::Time()
} }
Time::Time(int hour, int minute, int second) Time::Time(int timeHour, int timeMinute, int timeSecond)
{ {
assign(hour, minute, second); assign(timeHour, timeMinute, timeSecond);
} }
@ -52,35 +52,35 @@ Time::~Time()
} }
void Time::assign(int hour, int minute, int second) void Time::assign(int timeHour, int timeMinute, int timeSecond)
{ {
if (hour < 0 || hour > 23) if (timeHour < 0 || timeHour > 23)
throw InvalidArgumentException("Hour must be between 0 and 23."); throw InvalidArgumentException("Hour must be between 0 and 23.");
if (minute < 0 || minute > 59) if (timeMinute < 0 || timeMinute > 59)
throw InvalidArgumentException("Minute must be between 0 and 59."); throw InvalidArgumentException("Minute must be between 0 and 59.");
if (second < 0 || second > 59) if (timeSecond < 0 || timeSecond > 59)
throw InvalidArgumentException("Second must be between 0 and 59."); throw InvalidArgumentException("Second must be between 0 and 59.");
_hour = hour; _hour = timeHour;
_minute = minute; _minute = timeMinute;
_second = second; _second = timeSecond;
} }
bool Time::operator < (const Time& time) const bool Time::operator < (const Time& time) const
{ {
int hour = time.hour(); int timeHour = time.hour();
if (_hour < hour) return true; if (_hour < timeHour) return true;
else if (_hour > hour) return false; else if (_hour > timeHour) return false;
else // hours equal else // hours equal
{ {
int minute = time.minute(); int timeMinute = time.minute();
if (_minute < minute) return true; if (_minute < timeMinute) return true;
else else
if (_minute > minute) return false; if (_minute > timeMinute) return false;
else // minutes equal else // minutes equal
if (_second < time.second()) return true; if (_second < time.second()) return true;
} }

View File

@ -281,15 +281,15 @@ public:
/// Returns an iterator pointing to the first entry, if one exists. /// Returns an iterator pointing to the first entry, if one exists.
{ {
BucketVecIterator it(_buckets.begin()); BucketVecIterator it(_buckets.begin());
BucketVecIterator end(_buckets.end()); BucketVecIterator itEnd(_buckets.end());
while (it != end && it->empty()) while (it != itEnd && it->empty())
{ {
++it; ++it;
} }
if (it == end) if (it == itEnd)
return this->end(); return end();
else else
return ConstIterator(it, end, it->begin()); return ConstIterator(it, itEnd, it->begin());
} }
ConstIterator end() const ConstIterator end() const
@ -302,15 +302,15 @@ public:
/// Returns an iterator pointing to the first entry, if one exists. /// Returns an iterator pointing to the first entry, if one exists.
{ {
BucketVecIterator it(_buckets.begin()); BucketVecIterator it(_buckets.begin());
BucketVecIterator end(_buckets.end()); BucketVecIterator itEnd(_buckets.end());
while (it != end && it->empty()) while (it != itEnd && it->empty())
{ {
++it; ++it;
} }
if (it == end) if (it == itEnd)
return this->end(); return end();
else else
return Iterator(it, end, it->begin()); return Iterator(it, itEnd, it->begin());
} }
Iterator end() Iterator end()
@ -400,8 +400,8 @@ public:
void clear() void clear()
/// Erases all elements. /// Erases all elements.
{ {
LinearHashTable empty; LinearHashTable emptyTable;
swap(empty); swap(emptyTable);
} }
std::size_t size() const std::size_t size() const