All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DataStoreItem Class Reference

Description of the DataStoreItem class. More...

#include <GaudiKernel/DataStoreItem.h>

Collaboration diagram for DataStoreItem:

Public Member Functions

 DataStoreItem (const std::string &path, int depth=1)
 Standard Constructor. More...
 
 DataStoreItem (const DataStoreItem &item)
 Copy constructor. More...
 
virtual ~DataStoreItem ()
 Standard Destructor. More...
 
bool operator== (const DataStoreItem &cmp) const
 Equality operator. More...
 
bool operator!= (const DataStoreItem &cmp) const
 Inequality operator. More...
 
DataStoreItemoperator= (const DataStoreItem &cmp)
 Equivalence operator. More...
 
void analyse ()
 Interprete the load path for special options. More...
 
const std::string & path () const
 Accessor: Retrieve load path. More...
 
int depth () const
 Accessor: Retrieve load depth. More...
 

Protected Attributes

std::string m_path
 Path of item to be loaded. More...
 
int m_depth
 Depth to be auto-loaded from the requested path onwards. More...
 

Detailed Description

Description of the DataStoreItem class.

DataStoreItems describe in an abstract way an item in the data store. Items can be supplied to the services in order to e.g. trigger preloading or writing.

Author
M.Frank
Version
1.0

Definition at line 18 of file DataStoreItem.h.

Constructor & Destructor Documentation

DataStoreItem::DataStoreItem ( const std::string &  path,
int  depth = 1 
)
inline

Standard Constructor.

Definition at line 26 of file DataStoreItem.h.

27  : m_path(path), m_depth(depth) {
28  analyse();
29  }
int depth() const
Accessor: Retrieve load depth.
Definition: DataStoreItem.h:70
std::string m_path
Path of item to be loaded.
Definition: DataStoreItem.h:21
const std::string & path() const
Accessor: Retrieve load path.
Definition: DataStoreItem.h:66
void analyse()
Interprete the load path for special options.
Definition: DataStoreItem.h:54
int m_depth
Depth to be auto-loaded from the requested path onwards.
Definition: DataStoreItem.h:23
DataStoreItem::DataStoreItem ( const DataStoreItem item)
inline

Copy constructor.

Definition at line 31 of file DataStoreItem.h.

32  : m_path(item.m_path), m_depth(item.m_depth) {
33  analyse();
34  }
std::string m_path
Path of item to be loaded.
Definition: DataStoreItem.h:21
void analyse()
Interprete the load path for special options.
Definition: DataStoreItem.h:54
int m_depth
Depth to be auto-loaded from the requested path onwards.
Definition: DataStoreItem.h:23
virtual DataStoreItem::~DataStoreItem ( )
inlinevirtual

Standard Destructor.

Definition at line 36 of file DataStoreItem.h.

36  {
37  }

Member Function Documentation

void DataStoreItem::analyse ( )
inline

Interprete the load path for special options.

Definition at line 54 of file DataStoreItem.h.

54  {
55  int len = m_path.length()-1;
56  if ( m_path[len] == '*' ) {
57  m_depth = 99999999;
58  (m_path[len-1] == '/') ? m_path.erase(len-1, 2) : m_path.erase(len, 1);
59  }
60  else if ( m_path[len] == '+' ) {
61  (m_path[len-1] == '/') ? m_path.erase(len-1, 2) : m_path.erase(len, 1);
62  m_depth = 2;
63  }
64  }
std::string m_path
Path of item to be loaded.
Definition: DataStoreItem.h:21
int m_depth
Depth to be auto-loaded from the requested path onwards.
Definition: DataStoreItem.h:23
int DataStoreItem::depth ( ) const
inline

Accessor: Retrieve load depth.

Definition at line 70 of file DataStoreItem.h.

70  {
71  return m_depth;
72  }
int m_depth
Depth to be auto-loaded from the requested path onwards.
Definition: DataStoreItem.h:23
bool DataStoreItem::operator!= ( const DataStoreItem cmp) const
inline

Inequality operator.

Definition at line 43 of file DataStoreItem.h.

43  {
44  return ! ( m_path == cmp.path() && m_depth == cmp.depth() );
45  }
int depth() const
Accessor: Retrieve load depth.
Definition: DataStoreItem.h:70
std::string m_path
Path of item to be loaded.
Definition: DataStoreItem.h:21
const std::string & path() const
Accessor: Retrieve load path.
Definition: DataStoreItem.h:66
int m_depth
Depth to be auto-loaded from the requested path onwards.
Definition: DataStoreItem.h:23
DataStoreItem& DataStoreItem::operator= ( const DataStoreItem cmp)
inline

Equivalence operator.

Definition at line 47 of file DataStoreItem.h.

47  {
48  m_path = cmp.path();
49  m_depth = cmp.depth();
50  analyse();
51  return *this;
52  }
int depth() const
Accessor: Retrieve load depth.
Definition: DataStoreItem.h:70
std::string m_path
Path of item to be loaded.
Definition: DataStoreItem.h:21
const std::string & path() const
Accessor: Retrieve load path.
Definition: DataStoreItem.h:66
void analyse()
Interprete the load path for special options.
Definition: DataStoreItem.h:54
int m_depth
Depth to be auto-loaded from the requested path onwards.
Definition: DataStoreItem.h:23
bool DataStoreItem::operator== ( const DataStoreItem cmp) const
inline

Equality operator.

Definition at line 39 of file DataStoreItem.h.

39  {
40  return m_path == cmp.path() && m_depth == cmp.depth();
41  }
int depth() const
Accessor: Retrieve load depth.
Definition: DataStoreItem.h:70
std::string m_path
Path of item to be loaded.
Definition: DataStoreItem.h:21
const std::string & path() const
Accessor: Retrieve load path.
Definition: DataStoreItem.h:66
int m_depth
Depth to be auto-loaded from the requested path onwards.
Definition: DataStoreItem.h:23
const std::string& DataStoreItem::path ( ) const
inline

Accessor: Retrieve load path.

Definition at line 66 of file DataStoreItem.h.

66  {
67  return m_path;
68  }
std::string m_path
Path of item to be loaded.
Definition: DataStoreItem.h:21

Member Data Documentation

int DataStoreItem::m_depth
protected

Depth to be auto-loaded from the requested path onwards.

Definition at line 23 of file DataStoreItem.h.

std::string DataStoreItem::m_path
protected

Path of item to be loaded.

Definition at line 21 of file DataStoreItem.h.


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