Spm::Core::Element Class Reference

#include <element.h>

Inheritance diagram for Spm::Core::Element:

Spm::Util::Object Spm::Core::Package Spm::Core::Set List of all members.

Public Types

typedef std::list< Branch
* >::iterator 
iterator
typedef std::list< Branch
* >::const_iterator 
const_iterator
typedef std::list< Branch
* >::reverse_iterator 
reverse_iterator
typedef std::list< Branch
* >::const_reverse_iterator 
const_reverse_iterator

Public Member Functions

virtual ~Element ()
const std::string & getDescription ()
const std::string & getDescription () const
void setName (const std::string &name)
void setDescription (const std::string &description)
const Category * getCategory ()
const Category * getCategory () const
void setCategory (Category *aCategory)
void addBranch (Branch *aBranch) throw (AlreadyExistingBranchException)
void removeBranch (const std::string &aBranch) throw (UnknownBranchException, NoRightException)
std::list< Branch * > & getBranches ()
const std::list< Branch * > & getBranches () const
std::list< Branch * > getUserBranches (const std::string &user)
std::list< Branch * > getSystemBranches ()
const Branch * getBranch (const std::string &branchName) throw (UnknownBranchException)
Branch * getRefBranch (const std::string &branchName) throw (UnknownBranchException)
virtual bool uninstall (const std::string &branchName="") throw (UnknownBranchException)
 uninstall the Element (or a Branch)
virtual Branch * queryForFile (const std::string &file) throw (FileNotFoundException)
 Check if a file belong to this Element.
std::list< Branch * > findSameBranch (const std::string &branchName) throw (UnknownBranchException)
bool operator< (const Element *e) const
bool operator< (const Element &e) const
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
reverse_iterator rbegin ()
reverse_iterator rend ()
const_reverse_iterator rbegin () const
const_reverse_iterator rend () const

Protected Member Functions

 Element ()

Protected Attributes

Category * category
std::string description
std::string elementURL
std::list< Branch * > branches

Friends

class Store

Member Typedef Documentation

typedef std::list<Branch *>::const_iterator Spm::Core::Element::const_iterator
 

typedef std::list<Branch *>::const_reverse_iterator Spm::Core::Element::const_reverse_iterator
 

typedef std::list<Branch *>::iterator Spm::Core::Element::iterator
 

typedef std::list<Branch *>::reverse_iterator Spm::Core::Element::reverse_iterator
 


Constructor & Destructor Documentation

Spm::Core::Element::Element (   )  [protected]
 

virtual Spm::Core::Element::~Element (   )  [virtual]
 


Member Function Documentation

void Spm::Core::Element::addBranch (  Branch *  aBranch  )  throw (AlreadyExistingBranchException)
 

Parameters:
aBranch The Branch to add

const_iterator Spm::Core::Element::begin (   )  const [inline]
 

iterator Spm::Core::Element::begin (   )  [inline]
 

const_iterator Spm::Core::Element::end (   )  const [inline]
 

iterator Spm::Core::Element::end (   )  [inline]
 

std::list<Branch *> Spm::Core::Element::findSameBranch (  const std::string &  branchName  )  throw (UnknownBranchException)
 

const Branch* Spm::Core::Element::getBranch (  const std::string &  branchName  )  throw (UnknownBranchException)
 

Parameters:
branchName The name of the wanted Branch
Returns:
The wanted Branch

const std::list<Branch *>& Spm::Core::Element::getBranches (   )  const
 

std::list<Branch *>& Spm::Core::Element::getBranches (   ) 
 

Returns:
The list of Branch of this Element

const Category* Spm::Core::Element::getCategory (   )  const
 

Returns:
The description of the Element

const Category* Spm::Core::Element::getCategory (   ) 
 

Returns:
The description of the Element

const std::string& Spm::Core::Element::getDescription (   )  const
 

Returns:
The description of the Element

const std::string& Spm::Core::Element::getDescription (   ) 
 

Returns:
The description of the Element

Branch* Spm::Core::Element::getRefBranch (  const std::string &  branchName  )  throw (UnknownBranchException)
 

Parameters:
branchName The name of the wanted Branch
Returns:
The wanted Branch

std::list<Branch *> Spm::Core::Element::getSystemBranches (   ) 
 

Returns:
The list of Branch of this Element installed by root

std::list<Branch *> Spm::Core::Element::getUserBranches (  const std::string &  user  ) 
 

Parameters:
user The name of the user
Returns:
The list of Branch of this Element installed by this user

bool Spm::Core::Element::operator< (  const Element &  e  )  const
 

bool Spm::Core::Element::operator< (  const Element *  e  )  const
 

virtual Branch* Spm::Core::Element::queryForFile (  const std::string &  file  )  throw (FileNotFoundException) [virtual]
 

Check if a file belong to this Element.

Parameters:
file The name of the file to search
Returns:
The Branch of this file if it is found

const_reverse_iterator Spm::Core::Element::rbegin (   )  const [inline]
 

reverse_iterator Spm::Core::Element::rbegin (   )  [inline]
 

void Spm::Core::Element::removeBranch (  const std::string &  aBranch  )  throw (UnknownBranchException, NoRightException)
 

Parameters:
aBranch The name of the Branch to remove

const_reverse_iterator Spm::Core::Element::rend (   )  const [inline]
 

reverse_iterator Spm::Core::Element::rend (   )  [inline]
 

void Spm::Core::Element::setCategory (  Category *  aCategory  ) 
 

Parameters:
aCategory The new Category of the Element

void Spm::Core::Element::setDescription (  const std::string &  description  ) 
 

Parameters:
description The new description of the Element

void Spm::Core::Element::setName (  const std::string &  name  ) 
 

Parameters:
name The new name of the Element

virtual bool Spm::Core::Element::uninstall (  const std::string &  branchName = ""  )  throw (UnknownBranchException) [virtual]
 

uninstall the Element (or a Branch)

Parameters:
branchName The name of the branch to uninstall (if blank, The Element will be uninstalled)
Returns:
true if uninstall was succesfull


Friends And Related Function Documentation

friend class Store [friend]
 


Member Data Documentation

std::list<Branch *> Spm::Core::Element::branches [protected]
 

Category* Spm::Core::Element::category [protected]
 

std::string Spm::Core::Element::description [protected]
 

std::string Spm::Core::Element::elementURL [protected]
 


The documentation for this class was generated from the following file:
Generated on Wed Jul 4 15:27:21 2007 for libSpm by  doxygen 1.4.6