ICF 3.1.1.10
Technical documentation of ICF Libraries
CUser.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// Qt includes
10#include <QtCore/QString>
11
12// ICF includes
13#include <iser/ISerializable.h>
14
15
16namespace iauth
17{
18
19
20class CUser: virtual public iser::ISerializable
21{
22public:
23 CUser(const QString& userName = "", const QString& password = "", int userGroup = 0);
24 CUser(const CUser& user);
25
29 const QString& GetUserName() const;
30
34 const QString& GetPassword() const;
35
40 bool SetUserName(const QString& name);
41
46 int GetUserGroup() const;
47
52 void SetUserGroup(int group);
53
58 bool SetPassword(const QString& password);
59
63 bool CheckPassword(const QString& password) const;
64
69
70 // reimplemented (iser::ISerializable)
71 virtual bool Serialize(iser::IArchive& archive);
72
73private:
74 QString m_userName;
75 QString m_password;
76 int m_userGroup;
77};
78
79
80} // namespace iauth
81
82
virtual bool Serialize(iser::IArchive &archive)
Load or store state of this object as a archive stream.
int GetUserGroup() const
Get group number this user belongs.
void ResetPassword()
Set password to be reset.
bool CheckPassword(const QString &password) const
Check, if password is correct.
bool SetUserName(const QString &name)
Set name of user.
bool SetPassword(const QString &password)
Set password of this user.
const QString & GetUserName() const
Get name of user.
void SetUserGroup(int group)
Set group number this user belongs.
CUser(const QString &userName="", const QString &password="", int userGroup=0)
CUser(const CUser &user)
const QString & GetPassword() const
Get user's password.
Represent input/output persistence archive.
Definition IArchive.h:34
Common class for all classes which objects can be archived or restored from archive.
Contains implementations of interfaces and components related to right management.

© Witold Gantzke and Kirill Lepskiy