KVIrc  4.9.2
DeveloperAPIs
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
KviUserIdentityManager Class Reference

The class to manage the user identity. More...

#include <KviUserIdentityManager.h>

+ Inheritance diagram for KviUserIdentityManager:

Public Member Functions

void copyFrom (KviUserIdentityManager *pWorkingCopy)
 Carbon copy. More...
 
KviUserIdentityManagercreateWorkingCopy ()
 Creates a new working copy. More...
 
const KviUserIdentitydefaultIdentity ()
 Returns the default identity It's NEVER null. More...
 
const KviUserIdentityfindIdentity (const QString &szId)
 Searches fot an identity. More...
 
KviPointerHashTable< QString,
KviUserIdentity > * 
identityDict ()
 Returns the identity dictionary. More...
 
void load (const QString &szFileName)
 Loads the user identity database. More...
 
void releaseWorkingCopy (KviUserIdentityManager *pWorkingCopy)
 Deletes the working copy. More...
 
void save (const QString &szFileName)
 Saves the user identity database. More...
 
void setDefaultIdentity (const QString &szIdentityId)
 Sets the default identity. More...
 

Static Public Member Functions

static void done ()
 Deletese the user identity. More...
 
static void init ()
 Initializes a new user identity. More...
 
static KviUserIdentityManagerinstance ()
 Returns the instance of the identity. More...
 

Protected Member Functions

 KviUserIdentityManager ()
 Constructs the user identity manager object. More...
 
 ~KviUserIdentityManager ()
 Destroys the user identity manager object. More...
 

Protected Attributes

KviPointerHashTable< QString,
KviUserIdentity > * 
m_pIdentityDict
 
QString m_szDefaultIdentity
 

Static Protected Attributes

static KviUserIdentityManagerm_pInstance = nullptr
 

Detailed Description

The class to manage the user identity.

Constructor & Destructor Documentation

KviUserIdentityManager::KviUserIdentityManager ( )
protected

Constructs the user identity manager object.

Returns
KviUserIdentityManager

References m_pIdentityDict, and KviPointerHashTable< Key, T >::setAutoDelete().

Referenced by createWorkingCopy(), and init().

KviUserIdentityManager::~KviUserIdentityManager ( )
protected

Destroys the user identity manager object.

References m_pIdentityDict.

Member Function Documentation

void KviUserIdentityManager::copyFrom ( KviUserIdentityManager pWorkingCopy)
KviUserIdentityManager * KviUserIdentityManager::createWorkingCopy ( )

Creates a new working copy.

Returns
KviUserIdentityManager *

References copyFrom(), and KviUserIdentityManager().

const KviUserIdentity * KviUserIdentityManager::defaultIdentity ( )
void KviUserIdentityManager::done ( )
static

Deletese the user identity.

Returns
void

References m_pInstance.

Referenced by KviApplication::~KviApplication().

const KviUserIdentity* KviUserIdentityManager::findIdentity ( const QString &  szId)
inline

Searches fot an identity.

Parameters
szIdThe identity id to find
Returns
const KviUserIdentity *

Referenced by KviIrcContext::connectToCurrentServer().

KviPointerHashTable<QString, KviUserIdentity>* KviUserIdentityManager::identityDict ( )
inline

Returns the identity dictionary.

Returns
KviPointerHashTable<QString,KviUserIdentity> *
void KviUserIdentityManager::init ( )
static

Initializes a new user identity.

Returns
void

References KviUserIdentityManager(), and m_pInstance.

Referenced by KviApplication::setup().

static KviUserIdentityManager* KviUserIdentityManager::instance ( )
inlinestatic
void KviUserIdentityManager::load ( const QString &  szFileName)
void KviUserIdentityManager::releaseWorkingCopy ( KviUserIdentityManager pWorkingCopy)

Deletes the working copy.

Parameters
pWorkingCopyThe source working copy
Returns
void
void KviUserIdentityManager::save ( const QString &  szFileName)
void KviUserIdentityManager::setDefaultIdentity ( const QString &  szIdentityId)
inline

Sets the default identity.

Parameters
szIdentityIdThe identity id to set
Returns
void

Member Data Documentation

KviPointerHashTable<QString, KviUserIdentity>* KviUserIdentityManager::m_pIdentityDict
protected
KviUserIdentityManager * KviUserIdentityManager::m_pInstance = nullptr
staticprotected

Referenced by done(), and init().

QString KviUserIdentityManager::m_szDefaultIdentity
protected

Referenced by copyFrom(), defaultIdentity(), load(), and save().


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