#include <DataKey.h>
Public Types | |
enum | DoNotCopyMemory { kDoNotCopyMemory } |
Public Member Functions | |
DataKey () | |
DataKey (const TypeTag &iType, const IdTags &iId) | |
DataKey (const DataKey &iRHS) | |
DataKey (const TypeTag &iType, const IdTags &iId, DoNotCopyMemory) | |
const NameTag & | name () const |
bool | operator< (const DataKey &iRHS) const |
const DataKey & | operator= (const DataKey &) |
bool | operator== (const DataKey &iRHS) const |
const TypeTag & | type () const |
~DataKey () | |
Static Public Member Functions | |
template<class T > | |
static TypeTag | makeTypeTag () |
Private Member Functions | |
void | deleteMemory () |
void | makeCopyOfMemory () |
void | releaseMemory () |
void | swap (DataKey &) |
Private Attributes | |
NameTag | name_ |
bool | ownMemory_ |
TypeTag | type_ |
Friends | |
void | swap (DataKey &, DataKey &) |
DataKey::DataKey | ( | ) |
Definition at line 36 of file DataKey.cc.
: type_(), name_(), ownMemory_(false) { }
Definition at line 39 of file DataKey.h.
References makeCopyOfMemory().
: type_(iType), name_(iId), ownMemory_() { makeCopyOfMemory(); }
edm::eventsetup::DataKey::DataKey | ( | const TypeTag & | iType, |
const IdTags & | iId, | ||
DoNotCopyMemory | |||
) | [inline] |
Definition at line 47 of file DataKey.h.
: type_(iType), name_(iId), ownMemory_(false) {}
edm::eventsetup::DataKey::DataKey | ( | const DataKey & | iRHS | ) | [inline] |
Definition at line 54 of file DataKey.h.
References makeCopyOfMemory().
: type_(iRHS.type_), name_(iRHS.name_), ownMemory_() { makeCopyOfMemory(); }
edm::eventsetup::DataKey::~DataKey | ( | ) | [inline] |
void DataKey::deleteMemory | ( | ) | [private] |
Definition at line 115 of file DataKey.cc.
References kBlank, name(), edm::eventsetup::SimpleStringTag::value(), and relativeConstraints::value.
Referenced by releaseMemory().
void DataKey::makeCopyOfMemory | ( | ) | [private] |
Definition at line 94 of file DataKey.cc.
References kBlank, name(), name_, ownMemory_, matplotRender::t, edm::eventsetup::SimpleStringTag::value(), and relativeConstraints::value.
Referenced by DataKey().
{ //empty string is the most common case, so handle it special char* pName = const_cast<char*>(kBlank); //NOTE: if in the future additional tags are added then // I should make sure that pName gets deleted in the case // where an exception is thrown ArrayHolder pNameHolder; if(kBlank[0] != name().value()[0]) { pName = new char[ std::strlen(name().value()) + 1]; ArrayHolder t(pName); pNameHolder.swap(t); std::strcpy(pName, name().value()); } name_ = NameTag(pName); ownMemory_ = true; pNameHolder.release(); }
static TypeTag edm::eventsetup::DataKey::makeTypeTag | ( | ) | [inline, static] |
const NameTag& edm::eventsetup::DataKey::name | ( | void | ) | const [inline] |
Definition at line 67 of file DataKey.h.
References name_.
Referenced by edm::eventsetup::EventSetupRecord::add(), deleteMemory(), edm::eventsetup::EventSetupRecord::doGet(), edm::eventsetup::NoDataExceptionBase::endDataTypeMessage(), edm::eventsetup::EventSetupRecord::getFromProxy(), makeCopyOfMemory(), and edm::eventsetup::MakeDataException::standardMessage().
{ return name_; }
bool DataKey::operator< | ( | const DataKey & | iRHS | ) | const |
Definition at line 52 of file DataKey.cc.
References swap, and cond::rpcobtemp::temp.
bool DataKey::operator== | ( | const DataKey & | iRHS | ) | const |
void edm::eventsetup::DataKey::releaseMemory | ( | ) | [inline, private] |
Definition at line 82 of file DataKey.h.
References deleteMemory(), and ownMemory_.
Referenced by ~DataKey().
{ if(ownMemory_) { deleteMemory(); ownMemory_ = false; } }
void DataKey::swap | ( | DataKey & | iOther | ) | [private] |
Definition at line 65 of file DataKey.cc.
References name_, ownMemory_, swap, and type_.
const TypeTag& edm::eventsetup::DataKey::type | ( | ) | const [inline] |
Definition at line 66 of file DataKey.h.
References type_.
Referenced by edm::eventsetup::EventSetupRecord::add(), edm::eventsetup::EventSetupRecord::addTraceInfoToCmsException(), edm::eventsetup::EventSetupRecord::changeStdExceptionToCmsException(), and edm::eventsetup::MakeDataException::standardMessage().
{ return type_; }
Definition at line 100 of file DataKey.h.
Referenced by operator=(), edm::eventsetup::swap(), and swap().
{ a.swap(b); }
NameTag edm::eventsetup::DataKey::name_ [private] |
Definition at line 93 of file DataKey.h.
Referenced by makeCopyOfMemory(), name(), operator<(), operator==(), and swap().
bool edm::eventsetup::DataKey::ownMemory_ [private] |
Definition at line 94 of file DataKey.h.
Referenced by makeCopyOfMemory(), releaseMemory(), and swap().
TypeTag edm::eventsetup::DataKey::type_ [private] |
Definition at line 92 of file DataKey.h.
Referenced by operator<(), operator==(), swap(), and type().