| # Gaudi Framework, version v20r3
Generated: 24 Nov 2008

# DataStoreItem Class Reference

`#include <GaudiKernel/DataStoreItem.h>`

Collaboration diagram for DataStoreItem:

[legend]

List of all members.

## 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.

## Public Member Functions
| DataStoreItem (const std::string &path, int depth=1)
| Standard Constructor.
| DataStoreItem (const DataStoreItem &item)
| Copy constructor.
virtual | ~DataStoreItem ()
| Standard Destructor.
bool | operator== (const DataStoreItem &cmp) const
| Equality operator.
bool | operator!= (const DataStoreItem &cmp) const
| Inequality operator.
DataStoreItem & | operator= (const DataStoreItem &cmp)
| Equivalence operator.
void | analyse ()
| Interprete the load path for special options.
const std::string & | path () const
| Accessor: Retrieve load path.
int | depth () const
| Accessor: Retrieve load depth.
## Protected Attributes
std::string | m_path
| Path of item to be loaded.
int | m_depth
| Depth to be auto-loaded from the requested path onwards.

## Constructor & Destructor Documentation

DataStoreItem::DataStoreItem | ( | const std::string & | path,
|  | int | depth = `1` |
| ) |  |  | `[inline]`

Standard Constructor.

Definition at line 26 of file DataStoreItem.h.

    00027   : m_path(path), m_depth(depth)  {
    00028     analyse();
    00029   }

DataStoreItem::DataStoreItem | ( | const DataStoreItem & | item | ) | `[inline]`

Copy constructor.

Definition at line 31 of file DataStoreItem.h.

    00032   : m_path(item.m_path), m_depth(item.m_depth)  {
    00033     analyse();
    00034   }

virtual DataStoreItem::~DataStoreItem | ( |  | ) | `[inline, virtual]`

Standard Destructor.

Definition at line 36 of file DataStoreItem.h.

    00036                            {
    00037   }

## Member Function Documentation

bool DataStoreItem::operator== | ( | const DataStoreItem & | cmp | ) | const`[inline]`

Equality operator.

Definition at line 39 of file DataStoreItem.h.

    00039                                                      {
    00040     return m_path == cmp.path() && m_depth == cmp.depth();
    00041   }

bool DataStoreItem::operator!= | ( | const DataStoreItem & | cmp | ) | const`[inline]`

Inequality operator.

Definition at line 43 of file DataStoreItem.h.

    00043                                                      {
    00044     return ! ( m_path == cmp.path() && m_depth == cmp.depth() );
    00045   }

DataStoreItem& DataStoreItem::operator= | ( | const DataStoreItem & | cmp | ) | `[inline]`

Equivalence operator.

Definition at line 47 of file DataStoreItem.h.

    00047                                                       {
    00048     m_path  = cmp.path();
    00049     m_depth = cmp.depth();
    00050     analyse();
    00051     return *this;
    00052   }

void DataStoreItem::analyse | ( |  | ) | `[inline]`

Interprete the load path for special options.

Definition at line 54 of file DataStoreItem.h.

    00054                     {
    00055     int len = m_path.length()-1;
    00056     if ( m_path[len] == '*' )   {
    00057       m_depth = 99999999;
    00058       (m_path[len-1] == '/') ? m_path.erase(len-1, 2) : m_path.erase(len, 1);
    00059     }
    00060     else if ( m_path[len] == '+' )  {
    00061       (m_path[len-1] == '/') ? m_path.erase(len-1, 2) : m_path.erase(len, 1);
    00062       m_depth = 2;
    00063     }
    00064   }

const std::string& DataStoreItem::path | ( |  | ) | const`[inline]`

Accessor: Retrieve load path.

Definition at line 66 of file DataStoreItem.h.

    00066                                     {
    00067     return m_path;
    00068   }

int DataStoreItem::depth | ( |  | ) | const`[inline]`

Accessor: Retrieve load depth.

Definition at line 70 of file DataStoreItem.h.

    00070                       {
    00071     return m_depth;
    00072   }

## Member Data Documentation

std::string DataStoreItem::m_path`[protected]`

Path of item to be loaded.

Definition at line 21 of file DataStoreItem.h.

int DataStoreItem::m_depth`[protected]`

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

Definition at line 23 of file DataStoreItem.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r3/GaudiKernel/GaudiKernel/DataStoreItem.h