Information about a person (such as username, e-mail, Role)
More...
#include <Person.h>
|
| | Person (Role r, std::string name, std::string email, unsigned count=0) |
| | Create a Person with Role r, name, email and count of changes. More...
|
| |
|
const Role & | role () const |
| | Get Role of this Person.
|
| |
|
const std::string & | name () const |
| | Get name of this Person.
|
| |
|
const std::string & | email () const |
| | Get e-mail of this Person.
|
| |
|
std::string | userName () const |
| | Get user name (from e-mail)
|
| |
| auto | count () const |
| | Get count of changes historically done by this Person. More...
|
| |
| std::string | pretty (bool includeName=true) const |
| | Pretty format as "username <e-mail>". More...
|
| |
| template<typename T > |
| std::string | pretty (const T &translate, bool includeName=true) const |
| | Pretty format as "username <e-mail>". More...
|
| |
| void | setEmail (const std::string &email) |
| | Re-set e-mail to email. More...
|
| |
Information about a person (such as username, e-mail, Role)
◆ Person()
| SlKernCVS::Person::Person |
( |
Role |
r, |
|
|
std::string |
name, |
|
|
std::string |
email, |
|
|
unsigned |
count = 0 |
|
) |
| |
|
inline |
Create a Person with Role r, name, email and count of changes.
- Parameters
-
| r | Role of this Person |
| name | Name of this Person |
| email | E-mail of this Person |
| count | Count of changes historically done by this Person (in $KSOURCE_GIT) |
◆ count()
| auto SlKernCVS::Person::count |
( |
| ) |
const |
|
inline |
Get count of changes historically done by this Person.
- Returns
- Count of changes.
◆ parse()
| static std::optional<Person> SlKernCVS::Person::parse |
( |
std::string_view |
src | ) |
|
|
inlinestatic |
Try to parse a line.
- Parameters
-
- Returns
- A Person if successful, std::nullopt otherwise.
◆ parsePerson()
| static std::optional<Person> SlKernCVS::Person::parsePerson |
( |
std::string_view |
src, |
|
|
Role |
role |
|
) |
| |
|
static |
◆ pretty() [1/2]
| std::string SlKernCVS::Person::pretty |
( |
bool |
includeName = true | ) |
const |
|
inline |
Pretty format as "username <e-mail>".
- Parameters
-
| includeName | If output the username part |
- Returns
- Either "username <e-mail>" when
includeName is true or "e-mail" otherwise.
◆ pretty() [2/2]
template<typename T >
| std::string SlKernCVS::Person::pretty |
( |
const T & |
translate, |
|
|
bool |
includeName = true |
|
) |
| const |
|
inline |
Pretty format as "username <e-mail>".
- Parameters
-
| translate | A translate callback for e-mail |
| includeName | If output the username part |
- Returns
- Either "username <e-mail>" when
includeName is true or "e-mail" otherwise.
The e-mail is passed to translate() before passing to the output.
◆ setEmail()
| void SlKernCVS::Person::setEmail |
( |
const std::string & |
email | ) |
|
|
inline |
Re-set e-mail to email.
- Parameters
-
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/slhelpers-20260428.f233ce9/include/kerncvs/Person.h