incron  0.5.10
Public Member Functions | Static Public Member Functions | Protected Attributes
IncronTab Class Reference

Incron table class. More...

#include <incrontab.h>

List of all members.

Public Member Functions

 IncronTab ()
 Constructor.
 ~IncronTab ()
 Destructor.
void Add (const IncronTabEntry &rEntry)
 Add an entry to the table.
void Clear ()
 Removes all entries.
bool IsEmpty () const
 Checks whether the table is empty.
int GetCount () const
 Returns the count of entries.
IncronTabEntryGetEntry (int index)
 Returns an entry.
bool Load (const std::string &rPath)
 Loads the table.
bool Save (const std::string &rPath)
 Saves the table.

Static Public Member Functions

static bool CheckUser (const std::string &rUser)
 Checks whether an user has permission to use incron.
static std::string GetUserTablePath (const std::string &rUser)
 Composes a path to an user incron table file.
static std::string GetSystemTablePath (const std::string &rName)
 Composes a path to a system incron table file.

Protected Attributes

std::deque< IncronTabEntrym_tab
 incron table

Detailed Description

Incron table class.


Constructor & Destructor Documentation

IncronTab::IncronTab ( ) [inline]

Constructor.

IncronTab::~IncronTab ( ) [inline]

Destructor.


Member Function Documentation

void IncronTab::Add ( const IncronTabEntry rEntry) [inline]

Add an entry to the table.

Parameters:
[in]rEntrytable entry
bool IncronTab::CheckUser ( const std::string &  rUser) [static]

Checks whether an user has permission to use incron.

Parameters:
[in]rUseruser name
Returns:
true = permission OK, false = otherwise
void IncronTab::Clear ( ) [inline]

Removes all entries.

int IncronTab::GetCount ( ) const [inline]

Returns the count of entries.

Returns:
count of entries
IncronTabEntry& IncronTab::GetEntry ( int  index) [inline]

Returns an entry.

Returns:
reference to the entry for the given index
Attention:
This method doesn't test index bounds. If you pass an invalid value the program may crash and/or behave unpredictible way!
std::string IncronTab::GetSystemTablePath ( const std::string &  rName) [static]

Composes a path to a system incron table file.

Parameters:
[in]rNametable name (pseudouser)
Returns:
path to the table file
Attention:
No tests (existence, permission etc.) are done.
std::string IncronTab::GetUserTablePath ( const std::string &  rUser) [static]

Composes a path to an user incron table file.

Parameters:
[in]rUseruser name
Returns:
path to the table file
Attention:
No tests (existence, permission etc.) are done.
bool IncronTab::IsEmpty ( ) const [inline]

Checks whether the table is empty.

Returns:
true = empty, false = otherwise
bool IncronTab::Load ( const std::string &  rPath)

Loads the table.

Parameters:
[in]rPathpath to a source table file
Returns:
true = success, false = failure
bool IncronTab::Save ( const std::string &  rPath)

Saves the table.

Parameters:
[in]rPathpath to a destination table file
Returns:
true = success, false = failure

Member Data Documentation

std::deque<IncronTabEntry> IncronTab::m_tab [protected]

incron table


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