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.

Constructor & Destructor Documentation

◆ Result() [1/2]

Config::Result::Result ( size_t  nResultIdx)
inline

◆ ~Result()

Config::Result::~Result ( )

Definition at line 57 of file subsys/native/user/config/Config.cc.

◆ Result() [2/2]

Config::Result::Result ( char **  ppResult,
size_t  rows,
size_t  cols,
char *  error,
int  ret 
)

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

Member Function Documentation

◆ cols() [1/2]

size_t Config::Result::cols ( )

Returns the number of columns.

Definition at line 81 of file subsys/native/user/config/Config.cc.

◆ cols() [2/2]

size_t Config::Result::cols ( )
inline

Returns the number of columns.

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

◆ errorMessage() [1/2]

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

Returns the error message.

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

◆ errorMessage() [2/2]

std::string Config::Result::errorMessage ( size_t  buffSz = 256)

Returns the error message.

Definition at line 65 of file subsys/native/user/config/Config.cc.

◆ getBool() [1/4]

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

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

Definition at line 133 of file subsys/native/user/config/Config.cc.

◆ getBool() [2/4]

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

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

◆ getBool() [3/4]

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

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

Definition at line 113 of file subsys/native/user/config/Config.cc.

◆ getBool() [4/4]

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

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

◆ getColumnName() [1/2]

std::string Config::Result::getColumnName ( size_t  col,
size_t  buffSz = 256 
)

Returns the name of the col'th column.

Definition at line 85 of file subsys/native/user/config/Config.cc.

◆ getColumnName() [2/2]

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

Returns the name of the n'th column.

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

◆ getNum() [1/4]

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

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

Definition at line 129 of file subsys/native/user/config/Config.cc.

◆ getNum() [2/4]

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

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

◆ getNum() [3/4]

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

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

Definition at line 109 of file subsys/native/user/config/Config.cc.

◆ getNum() [4/4]

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

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

◆ getStr() [1/4]

std::string Config::Result::getStr ( size_t  row,
const char *  col,
size_t  buffSz = 256 
)

Returns the value in the column called 'col', in string form.

Definition at line 117 of file subsys/native/user/config/Config.cc.

◆ getStr() [2/4]

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

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

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

◆ getStr() [3/4]

std::string Config::Result::getStr ( size_t  row,
size_t  col,
size_t  buffSz = 256 
)

Returns the value in column 'col' of the result, in string form.

Definition at line 97 of file subsys/native/user/config/Config.cc.

◆ getStr() [4/4]

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 51 of file system/config/Config.cc.

◆ lookupCol()

size_t Config::Result::lookupCol ( const char *  str)
private

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

◆ rows() [1/2]

size_t Config::Result::rows ( )

Returns the number of rows.

Definition at line 77 of file subsys/native/user/config/Config.cc.

◆ rows() [2/2]

size_t Config::Result::rows ( )
inline

Returns the number of rows.

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

◆ succeeded() [1/2]

bool Config::Result::succeeded ( )

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

Definition at line 61 of file subsys/native/user/config/Config.cc.

◆ succeeded() [2/2]

bool Config::Result::succeeded ( )
inline

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

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

Member Data Documentation

◆ m_Cols

size_t Config::Result::m_Cols
private

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

◆ m_nResultIdx

size_t Config::Result::m_nResultIdx
private

◆ m_pError

char* Config::Result::m_pError
private

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

◆ m_ppResult

char** Config::Result::m_ppResult
private

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

◆ m_Ret

int Config::Result::m_Ret
private

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

◆ m_Rows

size_t Config::Result::m_Rows
private

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


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