CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
AstStringMap< T > Class Template Reference

#include <AstStringMap.h>

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 ()
 
 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
 
int stringToBucket (const std::string &key) const
 
unsigned stringToInt (const std::string &key) const
 

Friends

std::ostream & operator<< (std::ostream &stream, const AstStringMap< T > &map)
 
std::ostream & operator<< (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 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 InstallArea/include/MdcRecoUtil/MdcRecoUtil/AstStringMap.h.

Constructor & Destructor Documentation

◆ AstStringMap() [1/2]

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

◆ ~AstStringMap() [1/2]

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

◆ AstStringMap() [2/2]

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

◆ ~AstStringMap() [2/2]

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

Member Function Documentation

◆ clear() [1/2]

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

Referenced by Pdt::deleteAll().

◆ clear() [2/2]

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

◆ insert() [1/2]

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
keyString 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().

◆ insert() [2/2]

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
keyString to be used as a key for object
Returns
reference for user to set to new object pointer
See also
Template::myFunction

◆ operator[]() [1/2]

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

Find object using a string key.

Parameters
keyString to use to lookup object
Returns
Pointer to object (0 if no object found)

◆ operator[]() [2/2]

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

Find object using a string key.

Parameters
keyString to use to lookup object
Returns
Pointer to object (0 if no object found)

◆ size() [1/2]

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

◆ size() [2/2]

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

◆ stringToBucket() [1/2]

template<class T >
int AstStringMap< T >::stringToBucket ( const std::string &  key) const
inlineprotected

◆ stringToBucket() [2/2]

template<class T >
int AstStringMap< T >::stringToBucket ( const std::string &  key) const
inlineprotected

◆ stringToInt() [1/2]

template<class T >
unsigned AstStringMap< T >::stringToInt ( const std::string &  key) const
inlineprotected

◆ stringToInt() [2/2]

template<class T >
unsigned AstStringMap< T >::stringToInt ( const std::string &  key) const
inlineprotected

Friends And Related Function Documentation

◆ operator<< [1/2]

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
streamStream to output on
mapMap to output contents of
Returns
reference to stream
See also
Template::myFunction

◆ operator<< [2/2]

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
streamStream to output on
mapMap to output contents of
Returns
reference to stream
See also
Template::myFunction

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