GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
password Class Reference

#include "oct-password.h"

Collaboration diagram for password:

Public Member Functions

 password (const password &pw)
 
 password (void)
 
 ~password (void)=default
 
std::string dir (void) const
 
std::string gecos (void) const
 
gid_t gid (void) const
 
std::string name (void) const
 
bool ok (void) const
 
 operator bool () const
 
passwordoperator= (const password &pw)
 
std::string passwd (void) const
 
std::string shell (void) const
 
uid_t uid (void) const
 

Static Public Member Functions

static int endpwent (std::string &msg)
 
static int endpwent (void)
 
static password getpwent (std::string &msg)
 
static password getpwent (void)
 
static password getpwnam (const std::string &nm)
 
static password getpwnam (const std::string &nm, std::string &msg)
 
static password getpwuid (uid_t uid)
 
static password getpwuid (uid_t uid, std::string &msg)
 
static int setpwent (std::string &msg)
 
static int setpwent (void)
 

Private Member Functions

 password (void *p, std::string &msg)
 

Private Attributes

std::string m_dir
 
std::string m_gecos
 
gid_t m_gid
 
std::string m_name
 
std::string m_passwd
 
std::string m_shell
 
uid_t m_uid
 
bool m_valid
 

Detailed Description

Definition at line 39 of file oct-password.h.

Constructor & Destructor Documentation

◆ password() [1/3]

password::password ( void  )
inline

Definition at line 45 of file oct-password.h.

Referenced by getpwent(), getpwnam(), and getpwuid().

◆ password() [2/3]

password::password ( const password pw)
inline

Definition at line 50 of file oct-password.h.

◆ ~password()

password::~password ( void  )
default

◆ password() [3/3]

password::password ( void *  p,
std::string &  msg 
)
private

Definition at line 217 of file oct-password.cc.

References m_dir, m_gecos, m_gid, m_name, m_passwd, m_shell, m_uid, m_valid, NOT_SUPPORTED, and passwd().

Member Function Documentation

◆ dir()

std::string password::dir ( void  ) const

Definition at line 99 of file oct-password.cc.

References err_invalid(), m_dir, and ok().

◆ endpwent() [1/2]

int password::endpwent ( std::string &  msg)
static

Definition at line 205 of file oct-password.cc.

References endpwent(), and NOT_SUPPORTED.

◆ endpwent() [2/2]

int password::endpwent ( void  )
static

Definition at line 198 of file oct-password.cc.

Referenced by endpwent().

◆ gecos()

std::string password::gecos ( void  ) const

Definition at line 90 of file oct-password.cc.

References err_invalid(), m_gecos, and ok().

◆ getpwent() [1/2]

password password::getpwent ( std::string &  msg)
static

Definition at line 124 of file oct-password.cc.

References password(), getpwent(), and NOT_SUPPORTED.

◆ getpwent() [2/2]

password password::getpwent ( void  )
static

Definition at line 117 of file oct-password.cc.

Referenced by getpwent().

◆ getpwnam() [1/2]

password password::getpwnam ( const std::string &  nm)
static

Definition at line 157 of file oct-password.cc.

Referenced by getpwnam().

◆ getpwnam() [2/2]

password password::getpwnam ( const std::string &  nm,
std::string &  msg 
)
static

Definition at line 164 of file oct-password.cc.

References password(), getpwnam(), and NOT_SUPPORTED.

◆ getpwuid() [1/2]

password password::getpwuid ( uid_t  uid)
static

Definition at line 136 of file oct-password.cc.

References uid().

Referenced by getpwuid().

◆ getpwuid() [2/2]

password password::getpwuid ( uid_t  uid,
std::string &  msg 
)
static

Definition at line 143 of file oct-password.cc.

References password(), getpwuid(), NOT_SUPPORTED, and uid().

◆ gid()

gid_t password::gid ( void  ) const

Definition at line 81 of file oct-password.cc.

References err_invalid(), m_gid, and ok().

◆ name()

std::string password::name ( void  ) const

Definition at line 54 of file oct-password.cc.

References err_invalid(), m_name, and ok().

◆ ok()

bool password::ok ( void  ) const
inline

Definition at line 89 of file oct-password.h.

Referenced by dir(), gecos(), gid(), name(), passwd(), shell(), and uid().

◆ operator bool()

password::operator bool ( ) const
inline

Definition at line 91 of file oct-password.h.

◆ operator=()

password& password::operator= ( const password pw)
inline

Definition at line 56 of file oct-password.h.

References m_dir, m_gecos, m_gid, m_name, m_passwd, m_shell, m_uid, and m_valid.

◆ passwd()

std::string password::passwd ( void  ) const

Definition at line 63 of file oct-password.cc.

References err_invalid(), m_passwd, and ok().

Referenced by password().

◆ setpwent() [1/2]

int password::setpwent ( std::string &  msg)
static

Definition at line 185 of file oct-password.cc.

References NOT_SUPPORTED, and setpwent().

◆ setpwent() [2/2]

int password::setpwent ( void  )
static

Definition at line 178 of file oct-password.cc.

Referenced by setpwent().

◆ shell()

std::string password::shell ( void  ) const

Definition at line 108 of file oct-password.cc.

References err_invalid(), m_shell, and ok().

◆ uid()

uid_t password::uid ( void  ) const

Definition at line 72 of file oct-password.cc.

References err_invalid(), m_uid, and ok().

Referenced by getpwuid().

Member Data Documentation

◆ m_dir

std::string password::m_dir
private

Definition at line 126 of file oct-password.h.

Referenced by password(), dir(), and operator=().

◆ m_gecos

std::string password::m_gecos
private

Definition at line 123 of file oct-password.h.

Referenced by password(), gecos(), and operator=().

◆ m_gid

gid_t password::m_gid
private

Definition at line 120 of file oct-password.h.

Referenced by password(), gid(), and operator=().

◆ m_name

std::string password::m_name
private

Definition at line 111 of file oct-password.h.

Referenced by password(), name(), and operator=().

◆ m_passwd

std::string password::m_passwd
private

Definition at line 114 of file oct-password.h.

Referenced by password(), operator=(), and passwd().

◆ m_shell

std::string password::m_shell
private

Definition at line 129 of file oct-password.h.

Referenced by password(), operator=(), and shell().

◆ m_uid

uid_t password::m_uid
private

Definition at line 117 of file oct-password.h.

Referenced by password(), operator=(), and uid().

◆ m_valid

bool password::m_valid
private

Definition at line 132 of file oct-password.h.

Referenced by password(), and operator=().


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