more Data housekeeping

replaced more pointers with SharedPtr
This commit is contained in:
Aleksandar Fabijanic
2013-04-28 20:09:36 -05:00
parent a65d86a0b2
commit ebff906402
23 changed files with 368 additions and 277 deletions

View File

@@ -54,7 +54,7 @@ const std::size_t RecordSet::UNKNOWN_TOTAL_ROW_COUNT = std::numeric_limits<std::
RecordSet::RecordSet(const Statement& rStatement,
RowFormatterPtr pRowFormatter):
RowFormatter::Ptr pRowFormatter):
Statement(rStatement),
_currentRow(0),
_pBegin(new RowIterator(this, 0 == rowsExtracted())),
@@ -68,7 +68,7 @@ RecordSet::RecordSet(const Statement& rStatement,
RecordSet::RecordSet(Session& rSession,
const std::string& query,
RowFormatterPtr pRowFormatter):
RowFormatter::Ptr pRowFormatter):
Statement((rSession << query, now)),
_currentRow(0),
_pBegin(new RowIterator(this, 0 == rowsExtracted())),
@@ -308,7 +308,7 @@ bool RecordSet::moveLast()
}
void RecordSet::setRowFormatter(RowFormatterPtr pRowFormatter)
void RecordSet::setRowFormatter(RowFormatter::Ptr pRowFormatter)
{
pRowFormatter->setTotalRowCount(static_cast<int>(getTotalRowCount()));
Statement::setRowFormatter(pRowFormatter);

View File

@@ -60,7 +60,7 @@ Row::Row():
Row::Row(NameVecPtr pNames,
const RowFormatterPtr& pFormatter): _pNames(pNames)
const RowFormatter::Ptr& pFormatter): _pNames(pNames)
{
if (!_pNames) throw NullPointerException();
init(0, pFormatter);
@@ -69,14 +69,14 @@ Row::Row(NameVecPtr pNames,
Row::Row(NameVecPtr pNames,
const SortMapPtr& pSortMap,
const RowFormatterPtr& pFormatter): _pNames(pNames)
const RowFormatter::Ptr& pFormatter): _pNames(pNames)
{
if (!_pNames) throw NullPointerException();
init(pSortMap, pFormatter);
}
void Row::init(const SortMapPtr& pSortMap, const RowFormatterPtr& pFormatter)
void Row::init(const SortMapPtr& pSortMap, const RowFormatter::Ptr& pFormatter)
{
setFormatter(pFormatter);
setSortMap(pSortMap);
@@ -371,7 +371,7 @@ bool Row::operator < (const Row& other) const
}
void Row::setFormatter(const RowFormatterPtr& pFormatter)
void Row::setFormatter(const RowFormatter::Ptr& pFormatter)
{
if (pFormatter.get())
_pFormatter = pFormatter;