User Class Reference

User class is able to create Space's, load them from file or provide its references. More...

#include <User.h>

List of all members.

Public Member Functions

 User (Cache *cache, const string &login, unsigned quota)
 Constructor.
 ~User ()
 Destructor.
SpacecreateSpace (const string &name, unsigned softQuota, unsigned hardQuota)
 Creates the new Space object.
SpaceloadSpace (const string &name)
 Loads the Space from the file and fills with cache data.
SpaceselectSpace (const string &name)
 Returnes Space reference that has the given name or NULL if it does not exist.


Detailed Description

User class is able to create Space's, load them from file or provide its references.

Definition at line 27 of file User.h.


Constructor & Destructor Documentation

User::User ( Cache cache,
const string &  login,
unsigned  quota 
)

Constructor.

Parameters:
cache Pointer to cache object.
login User login.
quota Quota

Definition at line 11 of file User.cpp.


Member Function Documentation

Space * User::createSpace ( const string &  name,
unsigned  softQuota,
unsigned  hardQuota 
)

Creates the new Space object.

If space exists, returns pointer to it - quota parameters are ignored. At this point space is added to GarbageCollector's observed list to remove outdated entries in the future.

Parameters:
name Namespace's name.
softQuota Soft quota amount.
hardQuota Hard quota amount.
Returns:
new Space reference

Definition at line 24 of file User.cpp.

Space * User::loadSpace ( const string &  name  ) 

Loads the Space from the file and fills with cache data.

If there was a space with given name before the data is added to the existing space.

Parameters:
name loaded space's name
Returns:
Space reference

Definition at line 40 of file User.cpp.

Space * User::selectSpace ( const string &  name  ) 

Returnes Space reference that has the given name or NULL if it does not exist.

Parameters:
name Space's name.
Returns:
Space reference or NULL

Definition at line 105 of file User.cpp.


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

Generated on Fri Jan 8 10:38:13 2010 for dreamcache by  doxygen 1.5.5