renamed _ptr => _pImpl

This commit is contained in:
Aleksandar Fabijanic 2007-10-31 22:08:15 +00:00
parent a6aa475b55
commit dacc28ff55
2 changed files with 26 additions and 26 deletions

View File

@ -165,7 +165,7 @@ public:
Statement& operator << (const T& t) Statement& operator << (const T& t)
/// Concatenates data with the SQL statement string. /// Concatenates data with the SQL statement string.
{ {
_ptr->add(t); _pImpl->add(t);
return *this; return *this;
} }
@ -273,7 +273,7 @@ private:
const Result& doAsyncExec(); const Result& doAsyncExec();
/// Asynchronously executes the statement. /// Asynchronously executes the statement.
StatementImplPtr _ptr; StatementImplPtr _pImpl;
// asynchronous execution related members // asynchronous execution related members
bool _async; bool _async;
@ -333,72 +333,72 @@ inline Statement& Statement::operator , (Manipulator manip)
inline Statement& Statement::operator , (AbstractBinding* info) inline Statement& Statement::operator , (AbstractBinding* info)
{ {
_ptr->addBinding(info); _pImpl->addBinding(info);
return *this; return *this;
} }
inline Statement& Statement::operator , (AbstractExtraction* extract) inline Statement& Statement::operator , (AbstractExtraction* extract)
{ {
_ptr->addExtract(extract); _pImpl->addExtract(extract);
return *this; return *this;
} }
inline Statement& Statement::operator , (const Limit& extrLimit) inline Statement& Statement::operator , (const Limit& extrLimit)
{ {
_ptr->setExtractionLimit(extrLimit); _pImpl->setExtractionLimit(extrLimit);
return *this; return *this;
} }
inline Statement& Statement::operator , (const Range& extrRange) inline Statement& Statement::operator , (const Range& extrRange)
{ {
_ptr->setExtractionLimit(extrRange.lower()); _pImpl->setExtractionLimit(extrRange.lower());
_ptr->setExtractionLimit(extrRange.upper()); _pImpl->setExtractionLimit(extrRange.upper());
return *this; return *this;
} }
inline std::string Statement::toString() const inline std::string Statement::toString() const
{ {
return _ptr->toString(); return _pImpl->toString();
} }
inline const AbstractExtractionVec& Statement::extractions() const inline const AbstractExtractionVec& Statement::extractions() const
{ {
return _ptr->extractions(); return _pImpl->extractions();
} }
inline const MetaColumn& Statement::metaColumn(std::size_t pos) const inline const MetaColumn& Statement::metaColumn(std::size_t pos) const
{ {
return _ptr->metaColumn(static_cast<UInt32>(pos)); return _pImpl->metaColumn(static_cast<UInt32>(pos));
} }
inline const MetaColumn& Statement::metaColumn(const std::string& name) const inline const MetaColumn& Statement::metaColumn(const std::string& name) const
{ {
return _ptr->metaColumn(name); return _pImpl->metaColumn(name);
} }
inline void Statement::setStorage(const std::string& storage) inline void Statement::setStorage(const std::string& storage)
{ {
_ptr->setStorage(storage); _pImpl->setStorage(storage);
} }
inline std::size_t Statement::extractionCount() const inline std::size_t Statement::extractionCount() const
{ {
return _ptr->extractionCount(); return _pImpl->extractionCount();
} }
inline Statement::Storage Statement::storage() const inline Statement::Storage Statement::storage() const
{ {
return static_cast<Storage>(_ptr->getStorage()); return static_cast<Storage>(_pImpl->getStorage());
} }
@ -410,25 +410,25 @@ inline bool Statement::canModifyStorage()
inline bool Statement::initialized() inline bool Statement::initialized()
{ {
return _ptr->getState() == StatementImpl::ST_INITIALIZED; return _pImpl->getState() == StatementImpl::ST_INITIALIZED;
} }
inline bool Statement::paused() inline bool Statement::paused()
{ {
return _ptr->getState() == StatementImpl::ST_PAUSED; return _pImpl->getState() == StatementImpl::ST_PAUSED;
} }
inline bool Statement::done() inline bool Statement::done()
{ {
return _ptr->getState() == StatementImpl::ST_DONE; return _pImpl->getState() == StatementImpl::ST_DONE;
} }
inline bool Statement::isNull(std::size_t col, std::size_t row) const inline bool Statement::isNull(std::size_t col, std::size_t row) const
{ {
return _ptr->isNull(col, row); return _pImpl->isNull(col, row);
} }

View File

@ -49,7 +49,7 @@ namespace Data {
Statement::Statement(StatementImpl* pImpl): Statement::Statement(StatementImpl* pImpl):
_ptr(pImpl), _pImpl(pImpl),
_async(false) _async(false)
{ {
poco_check_ptr (pImpl); poco_check_ptr (pImpl);
@ -64,7 +64,7 @@ Statement::Statement(Session& session):
Statement::Statement(const Statement& stmt): Statement::Statement(const Statement& stmt):
_ptr(stmt._ptr), _pImpl(stmt._pImpl),
_async(stmt._async), _async(stmt._async),
_pResult(stmt._pResult), _pResult(stmt._pResult),
_pAsyncExec(stmt._pAsyncExec) _pAsyncExec(stmt._pAsyncExec)
@ -89,7 +89,7 @@ void Statement::swap(Statement& other)
{ {
using std::swap; using std::swap;
swap(_ptr, other._ptr); swap(_pImpl, other._pImpl);
swap(_async, other._async); swap(_async, other._async);
swap(_pAsyncExec, other._pAsyncExec); swap(_pAsyncExec, other._pAsyncExec);
swap(_pResult, other._pResult); swap(_pResult, other._pResult);
@ -112,8 +112,8 @@ Statement::ResultType Statement::execute()
{ {
if (!isAsync()) if (!isAsync())
{ {
if (isDone) _ptr->reset(); if (isDone) _pImpl->reset();
return _ptr->execute(); return _pImpl->execute();
} }
else else
{ {
@ -137,9 +137,9 @@ const Statement::Result& Statement::executeAsync()
const Statement::Result& Statement::doAsyncExec() const Statement::Result& Statement::doAsyncExec()
{ {
if (done()) _ptr->reset(); if (done()) _pImpl->reset();
if (!_pAsyncExec) if (!_pAsyncExec)
_pAsyncExec = new AsyncExecMethod(_ptr, &StatementImpl::execute); _pAsyncExec = new AsyncExecMethod(_pImpl, &StatementImpl::execute);
poco_check_ptr (_pAsyncExec); poco_check_ptr (_pAsyncExec);
_pResult = new Result((*_pAsyncExec)()); _pResult = new Result((*_pAsyncExec)());
poco_check_ptr (_pResult); poco_check_ptr (_pResult);
@ -151,7 +151,7 @@ void Statement::setAsync(bool async)
{ {
_async = async; _async = async;
if (_async && !_pAsyncExec) if (_async && !_pAsyncExec)
_pAsyncExec = new AsyncExecMethod(_ptr, &StatementImpl::execute); _pAsyncExec = new AsyncExecMethod(_pImpl, &StatementImpl::execute);
} }