AstStringMap< T > Class Template Reference

#include <AstStringMap.h>

List of all members.

Public Member Functions

 AstStringMap ()
virtual ~AstStringMap ()
virtual T * operator[] (const std::string &key) const
virtual int size () const
virtual T *& insert (const std::string &key)
virtual void clear ()

Protected Member Functions

int stringToBucket (const std::string &key) const
unsigned stringToInt (const std::string &key) const

Private Member Functions

 AstStringMap (const AstStringMap< T > &)
AstStringMap< T > & operator= (const AstStringMap< T > &)

Private Attributes

std::map< unsigned, T * > _intMap
std::map< unsigned, std::string_intStringMap
std::vector< std::map< std::string,
T * > > 
_stringMap

Friends

std::ostreamoperator<< (std::ostream &stream, const AstStringMap< T > &map)


Detailed Description

template<class T>
class AstStringMap< T >

This class is meant to be used to store an unowned pointer to and object that you reference with a std::string key.

This software was developed for the BaBar collaboration. If you use all or part of it, please give an appropriate acknowledgement.

Copyright (C) 2004 Stanford Linear Accelerator Center

History: Migration for BESIII MDC

See also:
Template
Version:
Id
AstStringMap.h,v 1.4 2010/03/25 09:55:57 zhangy Exp
Author:
Stephen J. Gowdy Originator;

Definition at line 78 of file AstStringMap.h.


Constructor & Destructor Documentation

template<class T>
AstStringMap< T >::AstStringMap (  ) 

template<class T>
virtual AstStringMap< T >::~AstStringMap (  )  [virtual]

template<class T>
AstStringMap< T >::AstStringMap ( const AstStringMap< T > &   )  [private]


Member Function Documentation

template<class T>
virtual void AstStringMap< T >::clear (  )  [virtual]

Referenced by Pdt::deleteAll().

template<class T>
virtual T*& AstStringMap< T >::insert ( const std::string key  )  [virtual]

Store a new reference to a pointer with a string as key

Parameters:
key String to be used as a key for object
Returns:
reference for user to set to new object pointer
See also:
Template::myFunction

Referenced by Pdt::addParticle().

template<class T>
AstStringMap<T>& AstStringMap< T >::operator= ( const AstStringMap< T > &   )  [private]

template<class T>
virtual T* AstStringMap< T >::operator[] ( const std::string key  )  const [virtual]

Find object using a string key.

Parameters:
key String to use to lookup object
Returns:
Pointer to object (0 if no object found)

template<class T>
virtual int AstStringMap< T >::size (  )  const [virtual]

template<class T>
int AstStringMap< T >::stringToBucket ( const std::string key  )  const [inline, protected]

template<class T>
unsigned AstStringMap< T >::stringToInt ( const std::string key  )  const [inline, protected]


Friends And Related Function Documentation

template<class T>
std::ostream& operator<< ( std::ostream stream,
const AstStringMap< T > &  map 
) [friend]

Output contents of map to ostream, requires operator<< for T

Parameters:
stream Stream to output on
map Map to output contents of
Returns:
reference to stream
See also:
Template::myFunction


Member Data Documentation

template<class T>
std::map< unsigned, T* > AstStringMap< T >::_intMap [private]

Definition at line 143 of file AstStringMap.h.

template<class T>
std::map< unsigned, std::string > AstStringMap< T >::_intStringMap [private]

Definition at line 145 of file AstStringMap.h.

template<class T>
std::vector< std::map< std::string, T* > > AstStringMap< T >::_stringMap [private]

Definition at line 148 of file AstStringMap.h.


Generated on Tue Nov 29 23:17:27 2016 for BOSS_7.0.2 by  doxygen 1.4.7