LibreOffice Module connectivity (master) 1
Public Member Functions | Private Attributes | List of all members
dbtools::SQLExceptionIteratorHelper Class Referencefinal

#include <dbexception.hxx>

Public Member Functions

 SQLExceptionIteratorHelper (const css::sdbc::SQLException &_rChainStart)
 constructs an iterator instance from an SQLException More...
 
 SQLExceptionIteratorHelper (const SQLExceptionInfo &_rErrorInfo)
 constructs an iterator instance from an SQLExceptionInfo More...
 
bool hasMoreElements () const
 determines whether there are more elements in the exception chain More...
 
void current (SQLExceptionInfo &_out_rInfo) const
 retrieves the current element in the chain, or <NULL> if the chain has been completely traveled. More...
 
const css::sdbc::SQLException * next ()
 proceeds to the next element in the chain More...
 
void next (SQLExceptionInfo &_out_rInfo)
 proceeds to the next element in the chain More...
 

Private Attributes

const css::sdbc::SQLException * m_pCurrent
 
SQLExceptionInfo::TYPE m_eCurrentType
 

Detailed Description

Definition at line 148 of file dbexception.hxx.

Constructor & Destructor Documentation

◆ SQLExceptionIteratorHelper() [1/2]

dbtools::SQLExceptionIteratorHelper::SQLExceptionIteratorHelper ( const css::sdbc::SQLException &  _rChainStart)

constructs an iterator instance from an SQLException

Parameters
_rChainStartthe start of the exception chain to iterate. Must live as long as the iterator instances lives, at least.

Definition at line 269 of file dbexception.cxx.

References TYPE.

◆ SQLExceptionIteratorHelper() [2/2]

dbtools::SQLExceptionIteratorHelper::SQLExceptionIteratorHelper ( const SQLExceptionInfo _rErrorInfo)

constructs an iterator instance from an SQLExceptionInfo

Parameters
_rErrorInfothe start of the exception chain to iterate. Must live as long as the iterator instances lives, at least.

Definition at line 257 of file dbexception.cxx.

References dbtools::SQLExceptionInfo::getType(), dbtools::SQLExceptionInfo::isValid(), m_eCurrentType, m_pCurrent, TYPE, and Undefined.

Member Function Documentation

◆ current()

void dbtools::SQLExceptionIteratorHelper::current ( SQLExceptionInfo _out_rInfo) const

retrieves the current element in the chain, or <NULL> if the chain has been completely traveled.

In opposite to the second <member>current</member>, this version allows typed access to the respective SQLException.

Definition at line 276 of file dbexception.cxx.

References Any, m_eCurrentType, m_pCurrent, dbtools::SQLExceptionInfo::SQLContext, dbtools::SQLExceptionInfo::SQLException, and dbtools::SQLExceptionInfo::SQLWarning.

Referenced by next().

◆ hasMoreElements()

bool dbtools::SQLExceptionIteratorHelper::hasMoreElements ( ) const
inline

determines whether there are more elements in the exception chain

Definition at line 172 of file dbexception.hxx.

Referenced by dbtools::lcl_concatWarnings(), and next().

◆ next() [1/2]

const css::sdbc::SQLException * dbtools::SQLExceptionIteratorHelper::next ( )

proceeds to the next element in the chain

Returns
the current element in the chain, as before the chain move.

Definition at line 299 of file dbexception.cxx.

References hasMoreElements(), isAssignableFrom(), m_eCurrentType, m_pCurrent, dbtools::SQLExceptionInfo::SQLContext, dbtools::SQLExceptionInfo::SQLException, dbtools::SQLExceptionInfo::SQLWarning, and dbtools::SQLExceptionInfo::Undefined.

Referenced by dbtools::lcl_concatWarnings(), and next().

◆ next() [2/2]

void dbtools::SQLExceptionIteratorHelper::next ( SQLExceptionInfo _out_rInfo)

proceeds to the next element in the chain

In opposite to the second <member>current</member>, this version allows typed access to the respective SQLException.

Definition at line 342 of file dbexception.cxx.

References current(), and next().

Member Data Documentation

◆ m_eCurrentType

SQLExceptionInfo::TYPE dbtools::SQLExceptionIteratorHelper::m_eCurrentType
private

Definition at line 151 of file dbexception.hxx.

Referenced by current(), next(), and SQLExceptionIteratorHelper().

◆ m_pCurrent

const css::sdbc::SQLException* dbtools::SQLExceptionIteratorHelper::m_pCurrent
private

Definition at line 150 of file dbexception.hxx.

Referenced by current(), next(), and SQLExceptionIteratorHelper().


The documentation for this class was generated from the following files: