openModeller  Version 1.5.0
PreMultiContainer< PreMultiContainerKeyT > Class Template Reference

#include <PreMultiContainer.hh>

Collaboration diagram for PreMultiContainer< PreMultiContainerKeyT >:
Collaboration graph

Public Member Functions

 PreMultiContainer ()
 
 PreMultiContainer (const PreMultiContainer< PreMultiContainerKeyT > &external)
 
 ~PreMultiContainer ()
 
bool operator== (const PreMultiContainer< PreMultiContainerKeyT > &ext_instance) const
 
bool operator!= (const PreMultiContainer< PreMultiContainerKeyT > &ext_instance) const
 
const PreMultiContainer
< PreMultiContainerKeyT > & 
operator= (const PreMultiContainer< PreMultiContainerKeyT > &ext_instance)
 
void clear ()
 
template<typename ObjectT >
void store (const PreMultiContainerKeyT &obj_key, const ObjectT &obj_reference)
 
template<typename ObjectT >
bool retrieve (const PreMultiContainerKeyT &obj_key, ObjectT &obj_reference) const
 
template<typename ObjectT >
void multiRetrieve (std::vector< std::pair< PreMultiContainerKeyT, ObjectT > > &objs_vector) const
 
template<typename ObjectT >
bool isStored (const PreMultiContainerKeyT &obj_key) const
 
void remove (const PreMultiContainerKeyT &obj_key)
 

Protected Types

typedef std::map
< PreMultiContainerKeyT,
MCNodeInterface
< PreMultiContainerKeyT > * > 
IntContainerT
 

Protected Member Functions

void update_time ()
 

Protected Attributes

IntContainerT container_instance_
 
time_t last_up_time_
 

Detailed Description

template<typename PreMultiContainerKeyT>
class PreMultiContainer< PreMultiContainerKeyT >

Definition at line 176 of file PreMultiContainer.hh.

Member Typedef Documentation

template<typename PreMultiContainerKeyT>
typedef std::map< PreMultiContainerKeyT, MCNodeInterface< PreMultiContainerKeyT >* > PreMultiContainer< PreMultiContainerKeyT >::IntContainerT
protected

Definition at line 275 of file PreMultiContainer.hh.

Constructor & Destructor Documentation

template<typename PreMultiContainerKeyT >
PreMultiContainer< PreMultiContainerKeyT >::PreMultiContainer ( )

Definition at line 293 of file PreMultiContainer.hh.

template<typename PreMultiContainerKeyT>
PreMultiContainer< PreMultiContainerKeyT >::PreMultiContainer ( const PreMultiContainer< PreMultiContainerKeyT > &  external)

Definition at line 299 of file PreMultiContainer.hh.

template<typename PreMultiContainerKeyT >
PreMultiContainer< PreMultiContainerKeyT >::~PreMultiContainer ( )

Definition at line 308 of file PreMultiContainer.hh.

Member Function Documentation

template<typename PreMultiContainerKeyT >
void PreMultiContainer< PreMultiContainerKeyT >::clear ( )
template<typename PreMultiContainerKeyT>
template<typename ObjectT >
bool PreMultiContainer< PreMultiContainerKeyT >::isStored ( const PreMultiContainerKeyT &  obj_key) const

Checks if a object is stored.

obj_key: Object key. note: The object type must be specified. return true if OK, false if the object is not stored.

Definition at line 497 of file PreMultiContainer.hh.

template<typename PreMultiContainerKeyT>
template<typename ObjectT >
void PreMultiContainer< PreMultiContainerKeyT >::multiRetrieve ( std::vector< std::pair< PreMultiContainerKeyT, ObjectT > > &  objs_vector) const

Retrieve copies of all stored objects of a defined type.

objs_vector: A vector with copies of all found objects. note: An empty vector will be returned if no object was found.

Definition at line 465 of file PreMultiContainer.hh.

template<typename PreMultiContainerKeyT>
bool PreMultiContainer< PreMultiContainerKeyT >::operator!= ( const PreMultiContainer< PreMultiContainerKeyT > &  ext_instance) const

Operator != overload.

ext_instance: External instance reference. return true if this instance don't have the same internal update time that the external instance.

Definition at line 342 of file PreMultiContainer.hh.

References PreMultiContainer< PreMultiContainerKeyT >::last_up_time_.

template<typename PreMultiContainerKeyT>
const PreMultiContainer< PreMultiContainerKeyT > & PreMultiContainer< PreMultiContainerKeyT >::operator= ( const PreMultiContainer< PreMultiContainerKeyT > &  ext_instance)

operator= overload.

ext_instance: External instance reference. return The external instance reference.

Definition at line 355 of file PreMultiContainer.hh.

References PreMultiContainer< PreMultiContainerKeyT >::container_instance_, and PreMultiContainer< PreMultiContainerKeyT >::last_up_time_.

template<typename PreMultiContainerKeyT>
bool PreMultiContainer< PreMultiContainerKeyT >::operator== ( const PreMultiContainer< PreMultiContainerKeyT > &  ext_instance) const

Operator == overload.

ext_instance: External instance reference. return true if this instance have the same internal update time that the external instance.

Definition at line 331 of file PreMultiContainer.hh.

References PreMultiContainer< PreMultiContainerKeyT >::last_up_time_.

template<typename PreMultiContainerKeyT>
void PreMultiContainer< PreMultiContainerKeyT >::remove ( const PreMultiContainerKeyT &  obj_key)

Remove a stored object.

obj_key: Object key.

Definition at line 521 of file PreMultiContainer.hh.

template<typename PreMultiContainerKeyT>
template<typename ObjectT >
bool PreMultiContainer< PreMultiContainerKeyT >::retrieve ( const PreMultiContainerKeyT &  obj_key,
ObjectT &  obj_reference 
) const

Retrieve a copy of a stored object.

obj_key: Object key. obj_reference: Object instance. return true if OK, false if the parameter was no found or error.

Definition at line 437 of file PreMultiContainer.hh.

Referenced by PreJackknife::checkParameters(), PreChiSquare::checkParameters(), PreChiSquare::init(), and PreChiSquare::runImplementation().

template<typename PreMultiContainerKeyT>
template<typename ObjectT >
void PreMultiContainer< PreMultiContainerKeyT >::store ( const PreMultiContainerKeyT &  obj_key,
const ObjectT &  obj_reference 
)

Store a object copy.

obj_key: Object key. obj_reference: Object instance.

Definition at line 405 of file PreMultiContainer.hh.

References MCNode< ObjectT, PreMultiContainerKeyT >::setObjPtr().

Referenced by PreJackknife::runImplementation(), and PreChiSquare::runImplementation().

Here is the call graph for this function:

template<typename PreMultiContainerKeyT >
void PreMultiContainer< PreMultiContainerKeyT >::update_time ( )
protected

Updates the internal last update time.

note: Needed by comparison between two multi containers.

Definition at line 398 of file PreMultiContainer.hh.

Member Data Documentation

template<typename PreMultiContainerKeyT>
IntContainerT PreMultiContainer< PreMultiContainerKeyT >::container_instance_
protected
template<typename PreMultiContainerKeyT>
time_t PreMultiContainer< PreMultiContainerKeyT >::last_up_time_
protected

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