The Pedigree Project  0.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Config::Result Class Reference
+ Collaboration diagram for Config::Result:

Public Member Functions

 Result (size_t nResultIdx)
 
bool succeeded ()
 Returns true if the result is valid, false if there was an error.
 
std::string errorMessage (size_t buffSz=256)
 Returns the error message.
 
size_t rows ()
 Returns the number of rows.
 
size_t cols ()
 Returns the number of columns.
 
std::string getColumnName (size_t col, size_t buffSz=256)
 Returns the name of the col'th column.
 
std::string getStr (size_t row, size_t col, size_t buffSz=256)
 Returns the value in column 'col' of the result, in string form.
 
size_t getNum (size_t row, size_t col)
 Returns the value in column 'col' of the result, in number form.
 
bool getBool (size_t row, size_t col)
 Returns the value in column 'col' of the result, in boolean form.
 
std::string getStr (size_t row, const char *col, size_t buffSz=256)
 Returns the value in the column called 'col', in string form.
 
size_t getNum (size_t row, const char *col)
 Returns the value in the column called 'col', in number form.
 
bool getBool (size_t row, const char *col)
 Returns the value in the column called 'col', in boolean form.
 
 Result (char **ppResult, size_t rows, size_t cols, char *error, int ret)
 
bool succeeded ()
 
char * errorMessage ()
 
size_t rows ()
 
size_t cols ()
 
String getColumnName (size_t n)
 
String getStr (size_t row, size_t n)
 
size_t getNum (size_t row, size_t n)
 
bool getBool (size_t row, size_t n)
 
String getStr (size_t row, const char *str)
 
size_t getNum (size_t row, const char *str)
 
bool getBool (size_t row, const char *str)
 

Private Member Functions

 Result (const Result &)
 
Resultoperator= (const Result &)
 
 Result (const Result &)
 
Resultoperator= (const Result &)
 
size_t lookupCol (const char *str)
 

Private Attributes

size_t m_nResultIdx
 
char ** m_ppResult
 
size_t m_Rows
 
size_t m_Cols
 
char * m_pError
 
int m_Ret
 

Detailed Description

Definition at line 29 of file subsys/native/include/pedigree/native/config/Config.h.

Member Function Documentation

size_t Config::Result::cols ( )
inline

Returns the number of columns.

Definition at line 60 of file system/config/Config.h.

char* Config::Result::errorMessage ( )
inline

Returns the error message.

Definition at line 49 of file system/config/Config.h.

bool Config::Result::getBool ( size_t  row,
size_t  n 
)

Returns the value in column 'n' of the result, in boolean form.

bool Config::Result::getBool ( size_t  row,
const char *  str 
)

Returns the value in the column called 'str', in boolean form.

String Config::Result::getColumnName ( size_t  n)

Returns the name of the n'th column.

Definition at line 49 of file system/config/Config.cc.

size_t Config::Result::getNum ( size_t  row,
size_t  n 
)

Returns the value in column 'n' of the result, in number form.

size_t Config::Result::getNum ( size_t  row,
const char *  str 
)

Returns the value in the column called 'str', in number form.

String Config::Result::getStr ( size_t  row,
size_t  n 
)

Returns the value in column 'n' of the result, in String form.

Definition at line 57 of file system/config/Config.cc.

References getBool(), and getNum().

String Config::Result::getStr ( size_t  row,
const char *  str 
)

Returns the value in the column called 'str', in String form.

Definition at line 84 of file system/config/Config.cc.

References ERROR, getBool(), getNum(), and Config::query().

size_t Config::Result::rows ( )
inline

Returns the number of rows.

Definition at line 55 of file system/config/Config.h.

bool Config::Result::succeeded ( )
inline

Returns true if the result is valid, false if there was an error.

Definition at line 44 of file system/config/Config.h.


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