modified mysql results/row to be ready for range based for

This commit is contained in:
Arthur Ice 2015-01-08 20:34:38 -08:00
parent 4808dcadcf
commit f6166bcb94
3 changed files with 8 additions and 2 deletions

View File

@ -48,7 +48,7 @@ public:
const std::string FieldName(int columnIndex); const std::string FieldName(int columnIndex);
MySQLRequestRow& begin() { return m_CurrentRow; } MySQLRequestRow& begin() { return m_CurrentRow; }
MySQLRequestRow& end() { return m_OneBeyondRow;} MySQLRequestRow& end() { return m_OneBeyondRow; }
private: private:
void FreeInternals(); void FreeInternals();

View File

@ -30,6 +30,12 @@ MySQLRequestRow& MySQLRequestRow::operator=(MySQLRequestRow& moveItem)
return *this; return *this;
} }
MySQLRequestRow MySQLRequestRow::operator*()
{
return *this;
}
MySQLRequestRow::MySQLRequestRow(MYSQL_RES *result) MySQLRequestRow::MySQLRequestRow(MYSQL_RES *result)
: m_Result(result) : m_Result(result)
{ {

View File

@ -28,7 +28,7 @@ public:
MySQLRequestRow operator++(int); MySQLRequestRow operator++(int);
bool operator==(const MySQLRequestRow& rhs); bool operator==(const MySQLRequestRow& rhs);
bool operator!=(const MySQLRequestRow& rhs); bool operator!=(const MySQLRequestRow& rhs);
MySQLRequestRow operator*();
char* operator[](int index); char* operator[](int index);
}; };