Backend/Database/GTable.cpp
/*!
 * @brief get GTable column with header (string)
 * @details retrieve the column data for the given header in the GTable
 * @param headerSearchText the desired-column's header as a string
 * @return the column's data
 */
@brief get GTable column with header (string)
@details retrieve the column data for the given header in the GTable
@param headerSearchText the desired-column's header as a string
@return the column's data
@brief get GTable column with header ( string ) @details retrieve the column data for the given header in the GTable @param headerSearchText the desired - column ' s header as a string @return the column ' s data
shmea::GList GTable::getCol(const GString& headerSearchText) const
{
	unsigned int index = -1;
	for (unsigned int i = 0; i < header.size(); ++i)
	{
		if (strcmp(headerSearchText.c_str(), header[i].c_str()) == 0)
		{
			index = i;
			break;
		}
	}
	if (index < numberOfCols())
	{
		shmea::GList retCol = getCol(index);
		return retCol;
	}
	shmea::GList emptyCol;
	return emptyCol;
}
shmea :: GList GTable :: getCol ( const GString & headerSearchText ) const { unsigned int index = -1 ; for ( unsigned int i = 0 ; i < header . size ( ) ; ++ i ) { if ( strcmp ( headerSearchText . c_str ( ) , header [ i ] . c_str ( ) ) == 0 ) { index = i ; break ; } } if ( index < numberOfCols ( ) ) { shmea :: GList retCol = getCol ( index ) ; return retCol ; } shmea :: GList emptyCol ; return emptyCol ; }
@brief get GTable column with header (string)
 @details retrieve the column data for the given header in the GTable
 @param headerSearchText the desired-column's header as a string
 @return the column's data
@brief get GTable column with header ( string ) @details retrieve the column data for the given header in the GTable @param headerSearchText the desired - column ' s header as a string @return the column ' s data
// does the column exist // get the column if it exists