Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AstStringMap< T > Class Template Reference

#include <AstStringMap.h>

List of all members.

Public Member Functions

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

Protected Member Functions

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

Private Member Functions

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

Private Attributes

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

Friends

std::ostreamoperator<< (std::ostream &stream, const AstStringMap< T > &map)
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;


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]
 

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]
 

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

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

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

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

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 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>
virtual int AstStringMap< T >::size  )  const [virtual]
 

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

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]
 

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

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]
 

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

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

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

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


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 15:51:48 2011 for BOSS6.5.5 by  doxygen 1.3.9.1