Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cpplib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-cpplib
Merge requests
!42
Release 0.2.0
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Closed
Release 0.2.0
release-0.2.0
into
main
Overview
0
Commits
87
Pipelines
1
Changes
1
Closed
Timm Fitschen
requested to merge
release-0.2.0
into
main
2 years ago
Overview
0
Commits
87
Pipelines
1
Changes
1
0
0
Merge request reports
Viewing commit
fd0769be
Prev
Next
Show latest version
1 file
+
67
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Verified
fd0769be
DOC: add doc strings to user.h
· fd0769be
Timm Fitschen
authored
3 years ago
include/caosdb/acm/user.h
+
67
−
1
View file @ fd0769be
Show full file
@@ -40,30 +40,96 @@ class Connection;
namespace
caosdb
::
acm
{
/**
* The UserImpl class is the delegate of the User class. It hides the
* implementation details from the clients.
*/
class
UserImpl
;
/**
* The User class is a delegator. The actual data is stored in a wrapped
* UserImpl object.
*/
class
User
{
public:
/**
* Default constructor.
*
* Initialize a user without any name, realm, password...
*/
User
();
/**
* Constructor. Initialize a user in the given realm with the given name.
*/
explicit
User
(
std
::
string
realm
,
std
::
string
name
);
/**
* Constructor. Initialize a user with the given name.
*/
explicit
User
(
std
::
string
name
);
explicit
User
(
std
::
unique_ptr
<
UserImpl
>
wrapped
);
/**
* Copy constructor.
*/
User
(
const
User
&
user
);
/**
* Move constructor.
*
* The moved-from user is empty, but still usable.
*/
User
(
User
&&
user
)
noexcept
;
/**
* Copy assignment.
*/
auto
operator
=
(
const
User
&
user
)
->
User
&
;
/**
* Move assignment.
*
* The moved-from user is empty, but still usable.
*/
auto
operator
=
(
User
&&
user
)
noexcept
->
User
&
;
/**
* Dtor.
*/
~
User
();
/**
* Return a string representation of this user.
*/
auto
ToString
()
const
->
std
::
string
;
/**
* Return the name of this user or the empty string.
*/
[[
nodiscard
]]
auto
GetName
()
const
->
const
std
::
string
&
;
/**
* Set the name of this user.
*/
auto
SetName
(
const
std
::
string
&
name
)
->
void
;
/**
* Return the realm of this user or the empty.
*/
[[
nodiscard
]]
auto
GetRealm
()
const
->
const
std
::
string
&
;
/**
* Set the realm of this user.
*/
auto
SetRealm
(
const
std
::
string
&
realm
)
->
void
;
/**
* Return the password of this user or the empty string.
*/
[[
nodiscard
]]
auto
GetPassword
()
const
->
const
std
::
string
&
;
/**
* Set the password of this user.
*/
auto
SetPassword
(
const
std
::
string
&
password
)
->
void
;
friend
class
caosdb
::
connection
::
Connection
;
private:
/**
* Constructor. Create a user object from the given UserImpl delegate.
*/
explicit
User
(
std
::
unique_ptr
<
UserImpl
>
wrapped
);
/**
* The UserImpl delegate.
*/
std
::
unique_ptr
<
UserImpl
>
wrapped
;
};
Loading