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

#include "oct-passwd.h"

Collaboration diagram for octave::sys::password:

Public Member Functions

 password (void)
 
 password (const password &pw)
 
 ~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 (void)
 
static int endpwent (std::string &msg)
 
static password getpwent (void)
 
static password getpwent (std::string &msg)
 
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 (void)
 
static int setpwent (std::string &msg)
 

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 valid
 

Detailed Description

Definition at line 36 of file oct-passwd.h.

Constructor & Destructor Documentation

◆ password() [1/3]

octave::sys::password::password ( void  )
inline

Definition at line 42 of file oct-passwd.h.

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

◆ password() [2/3]

octave::sys::password::password ( const password pw)
inline

Definition at line 47 of file oct-passwd.h.

◆ ~password()

octave::sys::password::~password ( void  )
default

◆ password() [3/3]

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

Definition at line 214 of file oct-passwd.cc.

References m_dir, m_gecos, m_gid, m_name, m_passwd, m_shell, m_uid, NOT_SUPPORTED, p, passwd(), struct(), and valid.

Member Function Documentation

◆ dir()

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

Definition at line 96 of file oct-passwd.cc.

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

Referenced by octave::sys::env::do_get_home_directory(), mk_pw_map(), and tilde_expand_word().

◆ endpwent() [1/2]

int octave::sys::password::endpwent ( void  )
static

Definition at line 195 of file oct-passwd.cc.

References string.

Referenced by endpwent().

◆ endpwent() [2/2]

int octave::sys::password::endpwent ( std::string msg)
static

Definition at line 202 of file oct-passwd.cc.

References endpwent(), and NOT_SUPPORTED.

◆ gecos()

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

Definition at line 87 of file oct-passwd.cc.

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

Referenced by mk_pw_map().

◆ getpwent() [1/2]

password octave::sys::password::getpwent ( void  )
static

Definition at line 114 of file oct-passwd.cc.

References string.

Referenced by getpwent().

◆ getpwent() [2/2]

password octave::sys::password::getpwent ( std::string msg)
static

Definition at line 121 of file oct-passwd.cc.

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

◆ getpwnam() [1/2]

password octave::sys::password::getpwnam ( const std::string nm)
static

Definition at line 154 of file oct-passwd.cc.

References nm, and string.

Referenced by getpwnam(), kpse_tilde_expand(), and tilde_expand_word().

◆ getpwnam() [2/2]

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

Definition at line 161 of file oct-passwd.cc.

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

◆ getpwuid() [1/2]

password octave::sys::password::getpwuid ( uid_t  uid)
static

◆ getpwuid() [2/2]

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

Definition at line 140 of file oct-passwd.cc.

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

◆ gid()

gid_t octave::sys::password::gid ( void  ) const

Definition at line 78 of file oct-passwd.cc.

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

Referenced by mk_pw_map().

◆ name()

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

Definition at line 51 of file oct-passwd.cc.

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

Referenced by octave::sys::env::do_get_user_name(), and mk_pw_map().

◆ ok()

bool octave::sys::password::ok ( void  ) const
inline

Definition at line 86 of file oct-passwd.h.

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

◆ operator bool()

octave::sys::password::operator bool ( ) const
inline

Definition at line 88 of file oct-passwd.h.

◆ operator=()

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

Definition at line 53 of file oct-passwd.h.

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

◆ passwd()

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

Definition at line 60 of file oct-passwd.cc.

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

Referenced by mk_pw_map(), and password().

◆ setpwent() [1/2]

int octave::sys::password::setpwent ( void  )
static

Definition at line 175 of file oct-passwd.cc.

References string.

Referenced by setpwent().

◆ setpwent() [2/2]

int octave::sys::password::setpwent ( std::string msg)
static

Definition at line 182 of file oct-passwd.cc.

References NOT_SUPPORTED, and setpwent().

◆ shell()

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

Definition at line 105 of file oct-passwd.cc.

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

Referenced by mk_pw_map().

◆ uid()

uid_t octave::sys::password::uid ( void  ) const

Definition at line 69 of file oct-passwd.cc.

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

Referenced by getpwuid(), and mk_pw_map().

Member Data Documentation

◆ m_dir

std::string octave::sys::password::m_dir
private

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

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

◆ m_gecos

std::string octave::sys::password::m_gecos
private

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

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

◆ m_gid

gid_t octave::sys::password::m_gid
private

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

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

◆ m_name

std::string octave::sys::password::m_name
private

Definition at line 108 of file oct-passwd.h.

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

◆ m_passwd

std::string octave::sys::password::m_passwd
private

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

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

◆ m_shell

std::string octave::sys::password::m_shell
private

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

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

◆ m_uid

uid_t octave::sys::password::m_uid
private

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

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

◆ valid

bool octave::sys::password::valid
private

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

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


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