LSSTApplications  8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
lsst::ap::match::ExposureInfoMap Class Reference

#include <ExposureInfo.h>

Public Types

typedef boost::shared_ptr
< ExposureInfoMap
Ptr
 
typedef boost::shared_ptr
< ExposureInfoMap const > 
ConstPtr
 

Public Member Functions

 ExposureInfoMap ()
 
 ~ExposureInfoMap ()
 
size_t size () const
 
bool empty () const
 
bool contains (int64_t id) const
 
ExposureInfo::Ptr get (int64_t id)
 
ExposureInfo::ConstPtr get (int64_t id) const
 
void insert (ExposureInfo::Ptr info)
 
void clear ()
 
bool erase (int64_t id)
 

Private Types

typedef
std::tr1::unordered_map
< int64_t, ExposureInfo::Ptr
Map
 

Private Attributes

Map _map
 

Detailed Description

A map from exposure ids to ExposureInfo objects.

Definition at line 180 of file ExposureInfo.h.

Member Typedef Documentation

Definition at line 183 of file ExposureInfo.h.

typedef std::tr1::unordered_map<int64_t, ExposureInfo::Ptr> lsst::ap::match::ExposureInfoMap::Map
private

Definition at line 206 of file ExposureInfo.h.

Definition at line 182 of file ExposureInfo.h.

Constructor & Destructor Documentation

lsst::ap::match::ExposureInfoMap::ExposureInfoMap ( )

Definition at line 234 of file ExposureInfo.cc.

lsst::ap::match::ExposureInfoMap::~ExposureInfoMap ( )

Definition at line 236 of file ExposureInfo.cc.

236 { }

Member Function Documentation

void lsst::ap::match::ExposureInfoMap::clear ( )

Definition at line 252 of file ExposureInfo.cc.

252  {
253  _map.clear();
254 }
bool lsst::ap::match::ExposureInfoMap::contains ( int64_t  id) const
inline

Definition at line 190 of file ExposureInfo.h.

190 { return _map.find(id) != _map.end(); }
bool lsst::ap::match::ExposureInfoMap::empty ( ) const
inline

Definition at line 189 of file ExposureInfo.h.

189 { return _map.empty(); }
bool lsst::ap::match::ExposureInfoMap::erase ( int64_t  id)

Definition at line 256 of file ExposureInfo.cc.

256  {
257  return _map.erase(id) != 0u;
258 }
ExposureInfo::Ptr lsst::ap::match::ExposureInfoMap::get ( int64_t  id)
inline

Definition at line 192 of file ExposureInfo.h.

192  {
193  Map::const_iterator i = _map.find(id);
194  return (i == _map.end()) ? ExposureInfo::Ptr() : i->second;
195  }
boost::shared_ptr< ExposureInfo > Ptr
Definition: ExposureInfo.h:63
ExposureInfo::ConstPtr lsst::ap::match::ExposureInfoMap::get ( int64_t  id) const
inline

Definition at line 196 of file ExposureInfo.h.

196  {
197  Map::const_iterator i = _map.find(id);
198  return (i == _map.end()) ? ExposureInfo::ConstPtr() : i->second;
199  }
boost::shared_ptr< ExposureInfo const > ConstPtr
Definition: ExposureInfo.h:64
void lsst::ap::match::ExposureInfoMap::insert ( ExposureInfo::Ptr  info)

Definition at line 238 of file ExposureInfo.cc.

238  {
239  if (!info) {
240  throw LSST_EXCEPT(InvalidParameterError, "Cannot insert a "
241  "null ExposureInfo into an ExposureInfoMap");
242  }
243  int64_t id = info->getId();
244  if (contains(id)) {
245  throw LSST_EXCEPT(InvalidParameterError, "ExposureInfoMap "
246  "already contains an exposure with the "
247  "specified id");
248  }
249  _map.insert(std::pair<int64_t, ExposureInfo::Ptr>(id, info));
250 }
bool contains(int64_t id) const
Definition: ExposureInfo.h:190
#define LSST_EXCEPT(type,...)
Definition: Exception.h:46
size_t lsst::ap::match::ExposureInfoMap::size ( ) const
inline

Definition at line 188 of file ExposureInfo.h.

188 { return _map.size(); }

Member Data Documentation

Map lsst::ap::match::ExposureInfoMap::_map
private

Definition at line 207 of file ExposureInfo.h.


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