CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
HcalItemColl< Item > Class Template Reference

#include <HcalItemColl.h>

Public Types

typedef Item value_type
 

Public Member Functions

const Item & at (const unsigned index) const
 
void clear ()
 
bool empty () const
 
const Item * get (const unsigned index) const
 
bool operator!= (const HcalItemColl &r) const
 
bool operator== (const HcalItemColl &r) const
 
void push_back (std::unique_ptr< Item > ptr)
 
void reserve (const unsigned n)
 
std::size_t size () const
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, unsigned)
 

Private Attributes

std::vector< boost::shared_ptr< Item > > data_
 

Friends

class boost::serialization::access
 

Detailed Description

template<typename Item>
class HcalItemColl< Item >

Definition at line 20 of file HcalItemColl.h.

Member Typedef Documentation

template<typename Item>
typedef Item HcalItemColl< Item >::value_type

Definition at line 23 of file HcalItemColl.h.

Member Function Documentation

template<typename Item>
const Item& HcalItemColl< Item >::at ( const unsigned  index) const
inline

Definition at line 45 of file HcalItemColl.h.

46  {return *data_.at(index);}
std::vector< boost::shared_ptr< Item > > data_
Definition: HcalItemColl.h:64
template<typename Item>
void HcalItemColl< Item >::clear ( void  )
inline
template<typename Item>
bool HcalItemColl< Item >::empty ( ) const
inline

Definition at line 35 of file HcalItemColl.h.

Referenced by Vispa.Gui.VispaWidget.TextField::setAutosizeFont(), and Vispa.Gui.VispaWidget.TextField::setAutotruncate().

35 {return data_.empty();}
std::vector< boost::shared_ptr< Item > > data_
Definition: HcalItemColl.h:64
template<typename Item>
const Item* HcalItemColl< Item >::get ( const unsigned  index) const
inline
template<typename Item>
bool HcalItemColl< Item >::operator!= ( const HcalItemColl< Item > &  r) const
inline

Definition at line 60 of file HcalItemColl.h.

61  {return !(*this == r);}
template<typename Item>
bool HcalItemColl< Item >::operator== ( const HcalItemColl< Item > &  r) const
inline

Definition at line 49 of file HcalItemColl.h.

50  {
51  const std::size_t sz = data_.size();
52  if (sz != r.data_.size())
53  return false;
54  for (std::size_t i=0; i<sz; ++i)
55  if (!(*data_[i] == *r.data_[i]))
56  return false;
57  return true;
58  }
std::vector< boost::shared_ptr< Item > > data_
Definition: HcalItemColl.h:64
template<typename Item>
void HcalItemColl< Item >::push_back ( std::unique_ptr< Item >  ptr)
inline

Definition at line 26 of file HcalItemColl.h.

27  {data_.push_back(boost::shared_ptr<Item>(ptr.release()));}
std::vector< boost::shared_ptr< Item > > data_
Definition: HcalItemColl.h:64
template<typename Item>
void HcalItemColl< Item >::reserve ( const unsigned  n)
inline

Definition at line 31 of file HcalItemColl.h.

31 {data_.reserve(n);}
std::vector< boost::shared_ptr< Item > > data_
Definition: HcalItemColl.h:64
template<typename Item>
template<class Archive >
void HcalItemColl< Item >::serialize ( Archive &  ar,
unsigned   
)
inlineprivate

Definition at line 69 of file HcalItemColl.h.

70  {
71  ar & data_;
72  }
std::vector< boost::shared_ptr< Item > > data_
Definition: HcalItemColl.h:64
template<typename Item>
std::size_t HcalItemColl< Item >::size ( void  ) const
inline

Definition at line 34 of file HcalItemColl.h.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

34 {return data_.size();}
std::vector< boost::shared_ptr< Item > > data_
Definition: HcalItemColl.h:64

Friends And Related Function Documentation

template<typename Item>
friend class boost::serialization::access
friend

Definition at line 66 of file HcalItemColl.h.

Member Data Documentation

template<typename Item>
std::vector<boost::shared_ptr<Item> > HcalItemColl< Item >::data_
private