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

View File

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

View File

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

View File

@ -49,9 +49,9 @@ public:
typedef Extraction<ValType> Type;
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()),
_rResult(result),
_rResult(rResult),
_default(),
_extracted(false)
/// 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()),
_rResult(result),
_rResult(rResult),
_default(def),
_extracted(false)
/// Creates an Extraction object at specified position.
@ -139,18 +139,18 @@ public:
typedef Extraction<ValType> Type;
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()),
_rResult(result),
_rResult(rResult),
_default()
{
_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()),
_rResult(result),
_rResult(rResult),
_default(def)
{
_rResult.clear();
@ -230,17 +230,17 @@ public:
typedef Extraction<ValType> Type;
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()),
_rResult(result),
_rResult(rResult),
_default()
{
_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()),
_rResult(result),
_rResult(rResult),
_default(def)
{
_rResult.clear();
@ -322,17 +322,17 @@ public:
typedef Extraction<ValType> Type;
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()),
_rResult(result),
_rResult(rResult),
_default()
{
_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()),
_rResult(result),
_rResult(rResult),
_default(def)
{
_rResult.clear();
@ -412,17 +412,17 @@ public:
typedef Extraction<ValType> Type;
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()),
_rResult(result),
_rResult(rResult),
_default()
{
_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()),
_rResult(result),
_rResult(rResult),
_default(def)
{
_rResult.clear();
@ -511,8 +511,8 @@ public:
typedef SharedPtr<Type> Ptr;
InternalExtraction(C& result, Column<C>* pColumn, const Position& pos = Position(0)):
Extraction<C>(result, ValType(), pos),
InternalExtraction(C& rResult, Column<C>* pColumn, const Position& pos = Position(0)):
Extraction<C>(rResult, ValType(), pos),
_pColumn(pColumn)
/// Creates InternalExtraction.
{
@ -572,17 +572,17 @@ public:
typedef SharedPtr<Type> Ptr;
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()),
_rResult(result),
_rResult(rResult),
_default()
{
_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()),
_rResult(result),
_rResult(rResult),
_default(def)
{
_rResult.clear();
@ -636,17 +636,17 @@ public:
typedef Extraction<ValType> Type;
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()),
_rResult(result),
_rResult(rResult),
_default()
{
_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()),
_rResult(result),
_rResult(rResult),
_default(def)
{
_rResult.clear();
@ -700,17 +700,17 @@ public:
typedef Extraction<ValType> Type;
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()),
_rResult(result),
_rResult(rResult),
_default()
{
_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()),
_rResult(result),
_rResult(rResult),
_default(def)
{
_rResult.clear();
@ -764,17 +764,17 @@ public:
typedef Extraction<ValType> Type;
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()),
_rResult(result),
_rResult(rResult),
_default()
{
_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()),
_rResult(result),
_rResult(rResult),
_default(def)
{
_rResult.clear();

View File

@ -53,20 +53,20 @@ public:
{
}
LOB(const std::vector<T>& content):
_pContent(new std::vector<T>(content))
LOB(const std::vector<T>& rContent):
_pContent(new std::vector<T>(rContent))
/// Creates the LOB, content is deep-copied.
{
}
LOB(const T* const pContent, std::size_t size):
_pContent(new std::vector<T>(pContent, pContent + size))
LOB(const T* const pContent, std::size_t objectSize):
_pContent(new std::vector<T>(pContent, pContent + objectSize))
/// Creates the LOB by deep-copying pContent.
{
}
LOB(const std::basic_string<T>& content):
_pContent(new std::vector<T>(content.begin(), content.end()))
LOB(const std::basic_string<T>& rContent):
_pContent(new std::vector<T>(rContent.begin(), rContent.end()))
/// 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.
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.
{
if (useFilter && isFiltered() && !isAllowed(row))
if (useFilter && isFiltered() && !isAllowed(dataRow))
throw InvalidAccessException("Row not allowed");
switch (storage())
@ -202,18 +202,18 @@ public:
case STORAGE_VECTOR:
{
typedef typename std::vector<T> C;
return column<C>(col).value(row);
return column<C>(col).value(dataRow);
}
case STORAGE_LIST:
{
typedef typename std::list<T> C;
return column<C>(col).value(row);
return column<C>(col).value(dataRow);
}
case STORAGE_DEQUE:
case STORAGE_UNKNOWN:
{
typedef typename std::deque<T> C;
return column<C>(col).value(row);
return column<C>(col).value(dataRow);
}
default:
throw IllegalStateException("Invalid storage setting.");
@ -221,10 +221,10 @@ public:
}
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.
{
if (useFilter && isFiltered() && !isAllowed(row))
if (useFilter && isFiltered() && !isAllowed(dataRow))
throw InvalidAccessException("Row not allowed");
switch (storage())
@ -232,18 +232,18 @@ public:
case STORAGE_VECTOR:
{
typedef typename std::vector<T> C;
return column<C>(name).value(row);
return column<C>(name).value(dataRow);
}
case STORAGE_LIST:
{
typedef typename std::list<T> C;
return column<C>(name).value(row);
return column<C>(name).value(dataRow);
}
case STORAGE_DEQUE:
case STORAGE_UNKNOWN:
{
typedef typename std::deque<T> C;
return column<C>(name).value(row);
return column<C>(name).value(dataRow);
}
default:
throw IllegalStateException("Invalid storage setting.");
@ -402,9 +402,9 @@ private:
const AbstractExtractionVec& rExtractions = extractions();
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());
@ -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.
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.
/// The property can be different from the default pool
/// value, in which case it is reset back to the pool
@ -104,8 +104,8 @@ public:
{
Session s = get();
_addPropertyMap.insert(AddPropertyMap::value_type(s.impl(),
std::make_pair(name, s.getProperty(name))));
s.setProperty(name, value);
std::make_pair(rName, s.getProperty(rName))));
s.setProperty(rName, value);
return s;
}

View File

@ -147,10 +147,10 @@ public:
/// Registers the Binding vector with the Statement.
template <typename C>
Statement& addBinding(C& bindingCont, bool reset)
Statement& addBinding(C& bindingCont, bool doReset)
/// Registers binding container with the Statement.
{
if (reset) _pImpl->resetBinding();
if (doReset) _pImpl->resetBinding();
typename C::iterator itAB = bindingCont.begin();
typename C::iterator itABEnd = bindingCont.end();
for (; itAB != itABEnd; ++itAB) addBind(*itAB);
@ -169,10 +169,10 @@ public:
/// Registers the vector of extraction vectors with the Statement.
template <typename C>
Statement& addExtraction(C& val, bool reset)
Statement& addExtraction(C& val, bool doReset)
/// Registers extraction container with the Statement.
{
if (reset) _pImpl->resetExtraction();
if (doReset) _pImpl->resetExtraction();
typename C::iterator itAE = val.begin();
typename C::iterator itAEEnd = val.end();
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 {
AbstractBinding::AbstractBinding(const std::string& name,
AbstractBinding::AbstractBinding(const std::string& rName,
Direction direction,
Poco::UInt32 bulkSize):
Poco::UInt32 bindingBulkSize):
_pBinder(0),
_name(name),
_name(rName),
_direction(direction),
_bulkSize(bulkSize)
_bulkSize(bindingBulkSize)
{
}

View File

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

View File

@ -21,7 +21,7 @@ namespace Poco {
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");
if (month < 1 || month > 12)
if (dateMonth < 1 || dateMonth > 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 " +
NumberFormatter::format(DateTime::daysOfMonth(year, month)));
NumberFormatter::format(DateTime::daysOfMonth(dateYear, dateMonth)));
_year = year;
_month = month;
_day = day;
_year = dateYear;
_month = dateMonth;
_day = dateDay;
}
bool Date::operator < (const Date& date) const
{
int year = date.year();
int dateYear = date.year();
if (_year < year) return true;
else if (_year > year) return false;
if (_year < dateYear) return true;
else if (_year > dateYear) return false;
else // years equal
{
int month = date.month();
if (_month < month) return true;
int dateMonth = date.month();
if (_month < dateMonth) return true;
else
if (_month > month) return false;
if (_month > dateMonth) return false;
else // months equal
if (_day < date.day()) return true;
}

View File

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

View File

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

View File

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

View File

@ -21,7 +21,7 @@ namespace Poco {
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();
RowMap::iterator it = _rowMap.begin();
RowMap::iterator end = _rowMap.end();
for (; it != end; ++it) delete it->second;
RowMap::iterator itEnd = _rowMap.end();
for (; it != itEnd; ++it) delete it->second;
}
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");
if (isNull(col, row)) return Poco::Dynamic::Var();
if (isNull(col, dataRow)) return Poco::Dynamic::Var();
switch (columnType(col))
{
case MetaColumn::FDT_BOOL: return value<bool>(col, row, useFilter);
case MetaColumn::FDT_INT8: return value<Int8>(col, row, useFilter);
case MetaColumn::FDT_UINT8: return value<UInt8>(col, row, useFilter);
case MetaColumn::FDT_INT16: return value<Int16>(col, row, useFilter);
case MetaColumn::FDT_UINT16: return value<UInt16>(col, row, useFilter);
case MetaColumn::FDT_INT32: return value<Int32>(col, row, useFilter);
case MetaColumn::FDT_UINT32: return value<UInt32>(col, row, useFilter);
case MetaColumn::FDT_INT64: return value<Int64>(col, row, useFilter);
case MetaColumn::FDT_UINT64: return value<UInt64>(col, row, useFilter);
case MetaColumn::FDT_FLOAT: return value<float>(col, row, useFilter);
case MetaColumn::FDT_DOUBLE: return value<double>(col, row, useFilter);
case MetaColumn::FDT_STRING: return value<std::string>(col, row, useFilter);
case MetaColumn::FDT_WSTRING: return value<UTF16String>(col, row, useFilter);
case MetaColumn::FDT_BLOB: return value<BLOB>(col, row, useFilter);
case MetaColumn::FDT_CLOB: return value<CLOB>(col, row, useFilter);
case MetaColumn::FDT_DATE: return value<Date>(col, row, useFilter);
case MetaColumn::FDT_TIME: return value<Time>(col, row, useFilter);
case MetaColumn::FDT_TIMESTAMP: return value<DateTime>(col, row);
case MetaColumn::FDT_BOOL: return value<bool>(col, dataRow, useFilter);
case MetaColumn::FDT_INT8: return value<Int8>(col, dataRow, useFilter);
case MetaColumn::FDT_UINT8: return value<UInt8>(col, dataRow, useFilter);
case MetaColumn::FDT_INT16: return value<Int16>(col, dataRow, useFilter);
case MetaColumn::FDT_UINT16: return value<UInt16>(col, dataRow, useFilter);
case MetaColumn::FDT_INT32: return value<Int32>(col, dataRow, useFilter);
case MetaColumn::FDT_UINT32: return value<UInt32>(col, dataRow, useFilter);
case MetaColumn::FDT_INT64: return value<Int64>(col, dataRow, useFilter);
case MetaColumn::FDT_UINT64: return value<UInt64>(col, dataRow, useFilter);
case MetaColumn::FDT_FLOAT: return value<float>(col, dataRow, useFilter);
case MetaColumn::FDT_DOUBLE: return value<double>(col, dataRow, useFilter);
case MetaColumn::FDT_STRING: return value<std::string>(col, dataRow, useFilter);
case MetaColumn::FDT_WSTRING: return value<UTF16String>(col, dataRow, useFilter);
case MetaColumn::FDT_BLOB: return value<BLOB>(col, dataRow, useFilter);
case MetaColumn::FDT_CLOB: return value<CLOB>(col, dataRow, useFilter);
case MetaColumn::FDT_DATE: return value<Date>(col, dataRow, useFilter);
case MetaColumn::FDT_TIME: return value<Time>(col, dataRow, useFilter);
case MetaColumn::FDT_TIMESTAMP: return value<DateTime>(col, dataRow);
default:
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");
if (isNull(metaColumn(name).position(), row)) return Poco::Dynamic::Var();
if (isNull(metaColumn(name).position(), dataRow)) return Poco::Dynamic::Var();
switch (columnType(name))
{
case MetaColumn::FDT_BOOL: return value<bool>(name, row, useFilter);
case MetaColumn::FDT_INT8: return value<Int8>(name, row, useFilter);
case MetaColumn::FDT_UINT8: return value<UInt8>(name, row, useFilter);
case MetaColumn::FDT_INT16: return value<Int16>(name, row, useFilter);
case MetaColumn::FDT_UINT16: return value<UInt16>(name, row, useFilter);
case MetaColumn::FDT_INT32: return value<Int32>(name, row, useFilter);
case MetaColumn::FDT_UINT32: return value<UInt32>(name, row, useFilter);
case MetaColumn::FDT_INT64: return value<Int64>(name, row, useFilter);
case MetaColumn::FDT_UINT64: return value<UInt64>(name, row, useFilter);
case MetaColumn::FDT_FLOAT: return value<float>(name, row, useFilter);
case MetaColumn::FDT_DOUBLE: return value<double>(name, row, useFilter);
case MetaColumn::FDT_STRING: return value<std::string>(name, row, useFilter);
case MetaColumn::FDT_WSTRING: return value<UTF16String>(name, row, useFilter);
case MetaColumn::FDT_BLOB: return value<BLOB>(name, row, useFilter);
case MetaColumn::FDT_DATE: return value<Date>(name, row, useFilter);
case MetaColumn::FDT_TIME: return value<Time>(name, row, useFilter);
case MetaColumn::FDT_TIMESTAMP: return value<DateTime>(name, row, useFilter);
case MetaColumn::FDT_BOOL: return value<bool>(name, dataRow, useFilter);
case MetaColumn::FDT_INT8: return value<Int8>(name, dataRow, useFilter);
case MetaColumn::FDT_UINT8: return value<UInt8>(name, dataRow, useFilter);
case MetaColumn::FDT_INT16: return value<Int16>(name, dataRow, useFilter);
case MetaColumn::FDT_UINT16: return value<UInt16>(name, dataRow, useFilter);
case MetaColumn::FDT_INT32: return value<Int32>(name, dataRow, useFilter);
case MetaColumn::FDT_UINT32: return value<UInt32>(name, dataRow, useFilter);
case MetaColumn::FDT_INT64: return value<Int64>(name, dataRow, useFilter);
case MetaColumn::FDT_UINT64: return value<UInt64>(name, dataRow, useFilter);
case MetaColumn::FDT_FLOAT: return value<float>(name, dataRow, useFilter);
case MetaColumn::FDT_DOUBLE: return value<double>(name, dataRow, useFilter);
case MetaColumn::FDT_STRING: return value<std::string>(name, dataRow, useFilter);
case MetaColumn::FDT_WSTRING: return value<UTF16String>(name, dataRow, useFilter);
case MetaColumn::FDT_BLOB: return value<BLOB>(name, dataRow, useFilter);
case MetaColumn::FDT_DATE: return value<Date>(name, dataRow, useFilter);
case MetaColumn::FDT_TIME: return value<Time>(name, dataRow, useFilter);
case MetaColumn::FDT_TIMESTAMP: return value<DateTime>(name, dataRow, useFilter);
default:
throw UnknownTypeException("Data type not supported.");
}
@ -205,19 +205,19 @@ std::size_t RecordSet::rowCount() const
if (!isFiltered()) return rc;
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;
}
bool RecordSet::isAllowed(std::size_t row) const
bool RecordSet::isAllowed(std::size_t dataRow) const
{
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);
RowMap::iterator it = _rowMap.begin();
RowMap::iterator end = _rowMap.end();
for (; it != end; ++it) it->second->setFormatter(getRowFormatter());
RowMap::iterator itEnd = _rowMap.end();
for (; it != itEnd; ++it) it->second->setFormatter(getRowFormatter());
}
else
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;
RowIterator it = *_pBegin + offset;
RowIterator end = (RowIterator::POSITION_END != length) ? it + length : *_pEnd;
std::copy(it, end, std::ostream_iterator<Row>(os));
RowIterator itEnd = (RowIterator::POSITION_END != length) ? it + length : *_pEnd;
std::copy(it, itEnd, std::ostream_iterator<Row>(os));
return os;
}
@ -342,9 +342,9 @@ void RecordSet::formatValues(std::size_t offset, std::size_t length) const
if (begin() == end()) return;
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;
for (; it != end; ++it) it->formatValues();
for (; it != itEnd; ++it) it->formatValues();
}

View File

@ -23,11 +23,11 @@ namespace Poco {
namespace Data {
RowFormatter::RowFormatter(const std::string& prefix,
const std::string& postfix,
RowFormatter::RowFormatter(const std::string& rPrefix,
const std::string& rPostfix,
Mode mode):
_prefix(prefix),
_postfix(postfix),
_prefix(rPrefix),
_postfix(rPostfix),
_mode(mode),
_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,
std::size_t timeout)
{
Session newSession(SessionFactory::instance().create(connector, connectionString, timeout));
Session newSession(SessionFactory::instance().create(rConnector, connectionString, timeout));
swap(newSession);
}

View File

@ -22,8 +22,8 @@ namespace Poco {
namespace Data {
SessionImpl::SessionImpl(const std::string& connectionString, std::size_t timeout):
_connectionString(connectionString),
SessionImpl::SessionImpl(const std::string& rConnectionString, std::size_t timeout):
_connectionString(rConnectionString),
_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())
throw Poco::InvalidAccessException("Can not change connection string on connected session."
" 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();
_addFeatureMap.insert(AddFeatureMap::value_type(s.impl(),
std::make_pair(name, s.getFeature(name))));
s.setFeature(name, value);
std::make_pair(rName, s.getFeature(rName))));
s.setFeature(rName, value);
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);
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)
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 (_featureMap.end() == it)
throw NotFoundException("Feature not found:" + name);
throw NotFoundException("Feature not found:" + rName);
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);
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)
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)
throw NotFoundException("Property not found:" + name);
throw NotFoundException("Property not found:" + rName);
return it->second;
}

View File

@ -37,10 +37,10 @@ Statement::Statement(StatementImpl::Ptr pImpl):
}
Statement::Statement(Session& session):
Statement::Statement(Session& rSession):
_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);
return *this;
}
std::size_t Statement::execute(bool reset)
std::size_t Statement::execute(bool doReset)
{
Mutex::ScopedLock lock(_mutex);
bool isDone = done();
@ -104,7 +104,7 @@ std::size_t Statement::execute(bool reset)
if (!isAsync())
{
if (isDone) _pImpl->reset();
return _pImpl->execute(reset);
return _pImpl->execute(doReset);
}
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);
if (initialized() || paused() || done())
return doAsyncExec(reset);
return doAsyncExec(doReset);
else
throw InvalidAccessException("Statement still executing.");
}
const Statement::Result& Statement::doAsyncExec(bool reset)
const Statement::Result& Statement::doAsyncExec(bool doReset)
{
if (done()) _pImpl->reset();
if (!_pAsyncExec)
_pAsyncExec = new AsyncExecMethod(_pImpl, &StatementImpl::execute);
_pResult = new Result((*_pAsyncExec)(reset));
_pResult = new Result((*_pAsyncExec)(doReset));
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())
{
@ -98,13 +98,13 @@ std::size_t StatementImpl::execute(const bool& reset)
if (lim < _lowerLimit)
throw LimitException("Did not receive enough data.");
assignSubTotal(reset);
assignSubTotal(rReset);
return lim;
}
void StatementImpl::assignSubTotal(bool reset)
void StatementImpl::assignSubTotal(bool doReset)
{
if (_extractors.size() == _subTotalRowCount.size())
{
@ -114,7 +114,7 @@ void StatementImpl::assignSubTotal(bool reset)
{
if (_extractors[counter].size())
{
if (reset)
if (doReset)
*it += CountVec::value_type(_extractors[counter][0]->numOfRowsHandled());
else
*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.");
if (minute < 0 || minute > 59)
if (timeMinute < 0 || timeMinute > 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.");
_hour = hour;
_minute = minute;
_second = second;
_hour = timeHour;
_minute = timeMinute;
_second = timeSecond;
}
bool Time::operator < (const Time& time) const
{
int hour = time.hour();
int timeHour = time.hour();
if (_hour < hour) return true;
else if (_hour > hour) return false;
if (_hour < timeHour) return true;
else if (_hour > timeHour) return false;
else // hours equal
{
int minute = time.minute();
if (_minute < minute) return true;
int timeMinute = time.minute();
if (_minute < timeMinute) return true;
else
if (_minute > minute) return false;
if (_minute > timeMinute) return false;
else // minutes equal
if (_second < time.second()) return true;
}

View File

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