Skip to content
Snippets Groups Projects
Verified Commit fd0769be authored by Timm Fitschen's avatar Timm Fitschen
Browse files

DOC: add doc strings to user.h

parent 78f84606
No related branches found
No related tags found
2 merge requests!42Release 0.2.0,!40F dot in username
Pipeline #25014 passed
Pipeline: caosdb-cppinttest

#25017

    ......@@ -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;
    };
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment