|
libcosmos
Linux C++ System Programming Library
|
Base class for PasswdInfo and GroupInfo. More...
#include <InfoBase.hxx>
Public Member Functions | |
| bool | valid () const |
| Returns whether data is present in the object. | |
| void | reset () |
| Zeroes out all data. | |
| const DB_STRUCT * | raw () const |
| Grants access to the raw underlying data structure. | |
| DB_STRUCT * | raw () |
Protected Member Functions | |
| bool | getInfo (std::function< int(DB_STRUCT **)> get_func, const char *errlabel) |
| Helper to drive the common getter function logic for getpw* and getgr*. | |
Protected Attributes | |
| bool | m_valid = false |
| DB_STRUCT | m_info |
| struct passwd or struct group. | |
| std::vector< char > | m_buf |
| Extra space for storing the dynamic strings in the m_info struct. | |
Base class for PasswdInfo and GroupInfo.
Definition at line 12 of file InfoBase.hxx.
|
protected |
Helper to drive the common getter function logic for getpw* and getgr*.
Definition at line 17 of file InfoBase.hxx.
|
inline |
Definition at line 27 of file InfoBase.hxx.
|
inline |
| void cosmos::InfoBase< DB_STRUCT >::reset | ( | ) |
Zeroes out all data.
Definition at line 40 of file InfoBase.hxx.
|
inline |
Returns whether data is present in the object.
If no corresponding entry was found during construction time then this returns false.
Definition at line 20 of file InfoBase.hxx.
|
protected |
Extra space for storing the dynamic strings in the m_info struct.
Definition at line 40 of file InfoBase.hxx.
|
protected |
struct passwd or struct group.
Definition at line 38 of file InfoBase.hxx.
|
protected |
Definition at line 36 of file InfoBase.hxx.