BOSS 7.0.8
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 ()
 

Protected Member Functions

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)
 

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 AstStringMap.h.

Constructor & Destructor Documentation

◆ AstStringMap()

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

◆ ~AstStringMap()

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

Member Function Documentation

◆ clear()

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

Referenced by Pdt::deleteAll().

◆ insert()

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

◆ operator[]()

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

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

Referenced by Pdt::printOn().

◆ stringToBucket()

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

◆ stringToInt()

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

Friends And Related Function Documentation

◆ operator<<

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 file: