Gaudi Framework, version v20r2

Generated: 18 Jul 2008

DataStoreItem Class Reference

#include <GaudiKernel/DataStoreItem.h>

Collaboration diagram for DataStoreItem:

Collaboration graph
[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.
DataStoreItemoperator= (const DataStoreItem &cmp)
 Equivalence operator.
void analyse ()
 Interprete the load path for special options.
const std::stringpath () 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.

References analyse().

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.

References analyse().

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.

References depth(), m_depth, m_path, and path().

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.

References depth(), m_depth, m_path, and path().

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.

References analyse(), depth(), m_depth, m_path, and path().

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.

References std::basic_string< _CharT, _Traits, _Alloc >::erase(), std::basic_string< _CharT, _Traits, _Alloc >::length(), m_depth, and m_path.

Referenced by DataStoreItem(), and operator=().

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.

References m_path.

Referenced by OutputStream::addItem(), OutputStream::collectObjects(), InputCopyStream::collectObjects(), operator!=(), operator=(), and operator==().

00066                                     {
00067     return m_path;
00068   }

int DataStoreItem::depth (  )  const [inline]

Accessor: Retrieve load depth.

Definition at line 70 of file DataStoreItem.h.

References m_depth.

Referenced by OutputStream::addItem(), operator!=(), operator=(), and operator==().

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.

Referenced by analyse(), operator!=(), operator=(), operator==(), and path().

int DataStoreItem::m_depth [protected]

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

Definition at line 23 of file DataStoreItem.h.

Referenced by analyse(), depth(), operator!=(), operator=(), and operator==().


The documentation for this class was generated from the following file:
Generated at Fri Jul 18 12:07:02 2008 for Gaudi Framework, version v20r2 by Doxygen version 1.5.1 written by Dimitri van Heesch, © 1997-2004