#include <OId.h>
Public Member Functions | |
int | containerId () const |
void | fromString (const std::string &s) |
int | itemId () const |
OId (int contId, int itemId) | |
OId (const OId &rhs) | |
OId () | |
bool | operator!= (const OId &rhs) const |
OId & | operator= (const OId &rhs) |
bool | operator== (const OId &rhs) const |
std::string | toString () |
Private Attributes | |
int | m_containerId |
int | m_itemId |
ora::OId::OId | ( | ) |
Definition at line 9 of file OId.cc.
: m_containerId(-1), m_itemId(-1){ }
ora::OId::OId | ( | int | contId, |
int | itemId | ||
) |
Definition at line 14 of file OId.cc.
: m_containerId( contId), m_itemId( itemId ){ }
ora::OId::OId | ( | const OId & | rhs | ) |
Definition at line 19 of file OId.cc.
: m_containerId( rhs.m_containerId), m_itemId( rhs.m_itemId ){ }
int ora::OId::containerId | ( | ) | const |
Definition at line 40 of file OId.cc.
Referenced by ora::Database::erase(), ora::Database::fetch(), ora::Database::fetchItem(), ora::Database::getNamesForObject(), cond::MetaData::getToken(), ora::Reference::set(), ora::Database::setObjectName(), cond::DbSession::storeObject(), ora::Database::update(), and ora::Database::updateItem().
{ return m_containerId; }
void ora::OId::fromString | ( | const std::string & | s | ) |
Definition at line 58 of file OId.cc.
References fmtContId, fmtItemId, p1, p2, p3, LaserTracksInput_cfi::source, and tmp.
{ std::string tmp = source; for(char* p1 = (char*)tmp.c_str(); p1; p1 = ::strchr(++p1,'[')) { char* p2 = ::strchr(p1, '='); char* p3 = ::strchr(p1, ']'); if ( p2 && p3 ) { if ( ::strncmp(fmtContId, p1, 4) == 0 ) { ::sscanf(p1, fmtContId, &m_containerId ); } else if ( ::strncmp(fmtItemId, p1, 4) == 0 ) { ::sscanf(p1, fmtItemId, &m_itemId ); } else { *p3 = *p2 = 0; } *p3 = ']'; *p2 = '='; } } }
int ora::OId::itemId | ( | ) | const |
Definition at line 44 of file OId.cc.
Referenced by ora::Database::erase(), ora::Database::fetch(), ora::Database::fetchItem(), ora::Database::getNamesForObject(), cond::MetaData::getToken(), ora::Reference::set(), ora::Database::setObjectName(), cond::DbSession::storeObject(), ora::Database::update(), and ora::Database::updateItem().
{ return m_itemId; }
bool ora::OId::operator!= | ( | const OId & | rhs | ) | const |
Definition at line 24 of file OId.cc.
References m_containerId, and m_itemId.
{ m_containerId = rhs.m_containerId; m_itemId = rhs.m_itemId; return *this; }
bool ora::OId::operator== | ( | const OId & | rhs | ) | const |
Definition at line 30 of file OId.cc.
References m_containerId, and m_itemId.
{ if(m_containerId != rhs.m_containerId ) return false; if(m_itemId != rhs.m_itemId ) return false; return true; }
std::string ora::OId::toString | ( | ) |
int ora::OId::m_containerId [private] |
Definition at line 21 of file OId.h.
Referenced by operator=(), and operator==().
int ora::OId::m_itemId [private] |
Definition at line 22 of file OId.h.
Referenced by operator=(), and operator==().