#include <OId.h>
Public Member Functions | |
int | containerId () const |
bool | fromString (const std::string &s) |
bool | isInvalid () const |
int | itemId () const |
OId () | |
OId (const OId &rhs) | |
OId (const std::pair< int, int > &oidPair) | |
OId (int contId, int itemId) | |
bool | operator!= (const OId &rhs) const |
OId & | operator= (const OId &rhs) |
bool | operator== (const OId &rhs) const |
void | reset () |
void | toOutputStream (std::ostream &os) const |
std::pair< int, int > | toPair () const |
std::string | toString () const |
Static Public Member Functions | |
static bool | isOId (const std::string &input) |
Private Attributes | |
int | m_containerId |
int | m_itemId |
ora::OId::OId | ( | ) |
Definition at line 14 of file OId.cc.
: m_containerId(-1), m_itemId(-1){ }
ora::OId::OId | ( | const std::pair< int, int > & | oidPair | ) | [explicit] |
Definition at line 19 of file OId.cc.
: m_containerId( oidPair.first ), m_itemId( oidPair.second ){ }
ora::OId::OId | ( | int | contId, |
int | itemId | ||
) |
Definition at line 24 of file OId.cc.
: m_containerId( contId), m_itemId( itemId ){ }
ora::OId::OId | ( | const OId & | rhs | ) |
Definition at line 29 of file OId.cc.
: m_containerId( rhs.m_containerId), m_itemId( rhs.m_itemId ){ }
int ora::OId::containerId | ( | ) | const |
Definition at line 50 of file OId.cc.
Referenced by cond::PoolTokenParser::className(), cond::DbSession::classNameForItem(), ora::Database::erase(), ora::Database::fetch(), ora::Database::fetchItem(), ora::Database::getNamesForObject(), cond::IOVImportIterator::importMoreElements(), cond::DbSession::importObject(), ora::Reference::set(), ora::Database::setObjectName(), ora::Database::update(), ora::Database::updateItem(), and cond::PoolTokenWriter::write().
{ return m_containerId; }
bool ora::OId::fromString | ( | const std::string & | s | ) |
Definition at line 64 of file OId.cc.
References OIDFMT, and OIDSIZ.
Referenced by cond::MetaData::addMapping(), cond::PoolTokenParser::className(), cond::DbSession::classNameForItem(), cond::DbSession::deleteObject(), cond::DbSession::getObject(), cond::DbSession::getTypedObject(), cond::IOVImportIterator::importMoreElements(), cond::DbSession::importObject(), cond::IOVElement::IOVElement(), isOId(), and cond::DbSession::updateObject().
bool ora::OId::isInvalid | ( | ) | const |
Definition at line 80 of file OId.cc.
Referenced by cond::DbSession::classNameForItem(), and cond::IOVElement::swapOId().
{ return (m_containerId == -1 || m_itemId == -1); }
bool ora::OId::isOId | ( | const std::string & | input | ) | [static] |
Definition at line 9 of file OId.cc.
References fromString(), and tmp.
{ ora::OId tmp; return tmp.fromString( input ); }
int ora::OId::itemId | ( | ) | const |
Definition at line 54 of file OId.cc.
Referenced by ora::Database::erase(), ora::Database::fetch(), ora::Database::fetchItem(), ora::Database::getNamesForObject(), ora::Reference::set(), ora::Database::setObjectName(), ora::Database::update(), ora::Database::updateItem(), and cond::PoolTokenWriter::write().
{ return m_itemId; }
bool ora::OId::operator!= | ( | const OId & | rhs | ) | const |
Definition at line 34 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 40 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; }
void ora::OId::reset | ( | void | ) |
Definition at line 75 of file OId.cc.
{ m_containerId = -1; m_itemId = -1; }
void ora::OId::toOutputStream | ( | std::ostream & | os | ) | const |
Definition at line 71 of file OId.cc.
References toString().
Referenced by operator<<().
{ os << this->toString(); }
std::pair< int, int > ora::OId::toPair | ( | ) | const |
Definition at line 84 of file OId.cc.
{ return std::make_pair( m_containerId, m_itemId ); }
std::string ora::OId::toString | ( | ) | const |
Definition at line 58 of file OId.cc.
References OIDFMT, OIDSIZ, and runonSM::text.
Referenced by cond::MetaData::getToken(), cond::DbSession::storeObject(), and cond::IOVElement::token().
int ora::OId::m_containerId [private] |
Definition at line 46 of file OId.h.
Referenced by operator=(), and operator==().
int ora::OId::m_itemId [private] |
Definition at line 47 of file OId.h.
Referenced by operator=(), and operator==().