LSSTApplications  1.1.2+25,10.0+13,10.0+132,10.0+133,10.0+224,10.0+41,10.0+8,10.0-1-g0f53050+14,10.0-1-g4b7b172+19,10.0-1-g61a5bae+98,10.0-1-g7408a83+3,10.0-1-gc1e0f5a+19,10.0-1-gdb4482e+14,10.0-11-g3947115+2,10.0-12-g8719d8b+2,10.0-15-ga3f480f+1,10.0-2-g4f67435,10.0-2-gcb4bc6c+26,10.0-28-gf7f57a9+1,10.0-3-g1bbe32c+14,10.0-3-g5b46d21,10.0-4-g027f45f+5,10.0-4-g86f66b5+2,10.0-4-gc4fccf3+24,10.0-40-g4349866+2,10.0-5-g766159b,10.0-5-gca2295e+25,10.0-6-g462a451+1
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
lsst::ap::PersistableIdVector Class Reference

A persistable wrapper for an IdVector. More...

#include <Results.h>

Inheritance diagram for lsst::ap::PersistableIdVector:
lsst.daf.base::Persistable lsst.daf.base::Citizen

Public Types

typedef boost::shared_ptr
< PersistableIdVector
Ptr
 
- Public Types inherited from lsst.daf.base::Persistable
typedef boost::shared_ptr
< Persistable
Ptr
 
- Public Types inherited from lsst.daf.base::Citizen
enum  { magicSentinel = 0xdeadbeef }
 
typedef unsigned long memId
 Type of the block's ID. More...
 
typedef memId(* memNewCallback )(const memId cid)
 A function used to register a callback. More...
 
typedef memId(* memCallback )(const Citizen *ptr)
 

Public Member Functions

 PersistableIdVector ()
 
 PersistableIdVector (IdVector const &)
 
 ~PersistableIdVector ()
 
IdVectorgetIds ()
 
IdVector const & getIds () const
 
void setIds (IdVector const &ids)
 
bool operator== (IdVector const &other) const
 
bool operator== (PersistableIdVector const &other) const
 
- Public Member Functions inherited from lsst.daf.base::Persistable
 Persistable (void)
 
virtual ~Persistable (void)
 
template<class Archive >
void serialize (Archive &, unsigned int const)
 
- Public Member Functions inherited from lsst.daf.base::Citizen
 Citizen (const std::type_info &)
 
 Citizen (Citizen const &)
 
 ~Citizen ()
 
Citizenoperator= (Citizen const &)
 
std::string repr () const
 Return a string representation of a Citizen. More...
 
void markPersistent (void)
 Mark a Citizen as persistent and not destroyed until process end. More...
 
memId getId () const
 Return the Citizen's ID. More...
 

Private Member Functions

 LSST_PERSIST_FORMATTER (lsst::ap::io::IdVectorFormatter)
 

Private Attributes

IdVector _ids
 

Additional Inherited Members

- Static Public Member Functions inherited from lsst.daf.base::Citizen
static bool hasBeenCorrupted ()
 Check all allocated blocks for corruption. More...
 
static memId getNextMemId ()
 Return the memId of the next object to be allocated. More...
 
static int init ()
 Called once when the memory system is being initialised. More...
 
static int census (int, memId startingMemId=0)
 How many active Citizens are there? More...
 
static void census (std::ostream &stream, memId startingMemId=0)
 Print a list of all active Citizens to stream, sorted by ID. More...
 
static const std::vector
< const Citizen * > * 
census ()
 Return a (newly allocated) std::vector of active Citizens sorted by ID. More...
 
static memId setNewCallbackId (memId id)
 Call the NewCallback when block is allocated. More...
 
static memId setDeleteCallbackId (memId id)
 Call the current DeleteCallback when block is deleted. More...
 
static memNewCallback setNewCallback (memNewCallback func)
 Set the NewCallback function. More...
 
static memCallback setDeleteCallback (memCallback func)
 Set the DeleteCallback function. More...
 
static memCallback setCorruptionCallback (memCallback func)
 Set the CorruptionCallback function. More...
 

Detailed Description

A persistable wrapper for an IdVector.

Definition at line 197 of file Results.h.

Member Typedef Documentation

Definition at line 202 of file Results.h.

Constructor & Destructor Documentation

lsst::ap::PersistableIdVector::PersistableIdVector ( )

Definition at line 86 of file Results.cc.

86  :
87  lsst::daf::base::Citizen(typeid(*this)),
88  _ids()
89 {}
Citizen is a class that should be among all LSST classes base classes, and handles basic memory manag...
Definition: Citizen.h:56
lsst::ap::PersistableIdVector::PersistableIdVector ( IdVector const &  ids)
explicit

Definition at line 92 of file Results.cc.

92  :
93  lsst::daf::base::Citizen(typeid(*this)),
94  _ids(ids)
95 {}
Citizen is a class that should be among all LSST classes base classes, and handles basic memory manag...
Definition: Citizen.h:56
lsst::ap::PersistableIdVector::~PersistableIdVector ( )

Definition at line 98 of file Results.cc.

98 {}

Member Function Documentation

IdVector& lsst::ap::PersistableIdVector::getIds ( )
inline

Definition at line 208 of file Results.h.

208  {
209  return _ids;
210  }
IdVector const& lsst::ap::PersistableIdVector::getIds ( ) const
inline

Definition at line 211 of file Results.h.

211  {
212  return _ids;
213  }
lsst::ap::PersistableIdVector::LSST_PERSIST_FORMATTER ( lsst::ap::io::IdVectorFormatter  )
private
bool lsst::ap::PersistableIdVector::operator== ( IdVector const &  other) const

Definition at line 100 of file Results.cc.

100  {
101  if (_ids.size() != other.size()) {
102  return false;
103  }
104  return std::equal(_ids.begin(), _ids.end(), other.begin());
105 }
< unspecified-expression-type > equal(ExpressionBase< Operand > const &operand, Scalar const &scalar)
Definition: operators.h:796
bool lsst::ap::PersistableIdVector::operator== ( PersistableIdVector const &  other) const
inline

Definition at line 219 of file Results.h.

219  {
220  return other == _ids;
221  }
void lsst::ap::PersistableIdVector::setIds ( IdVector const &  ids)
inline

Definition at line 214 of file Results.h.

214  {
215  _ids = ids;
216  }

Member Data Documentation

IdVector lsst::ap::PersistableIdVector::_ids
private

Definition at line 225 of file Results.h.


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