prophet::BundleOfferComp Struct Reference

Due to extensive use of copy constructors in the STL, any inheritance hierarchy of comparators will always get "clipped" back to the base type. More...

#include <FwdStrategy.h>

List of all members.

Public Member Functions

 BundleOfferComp (const FwdStrategyComp *comp)
bool operator() (const Bundle *a, const Bundle *b) const

Public Attributes

const FwdStrategyCompcomp_
 pointer to actual comparator instance

Detailed Description

Due to extensive use of copy constructors in the STL, any inheritance hierarchy of comparators will always get "clipped" back to the base type.

See Scott Meyer's excellent text on "Effective STL." To get around this limitation, use a wrapper that invokes the proper method based on a pointer dereference. It's a long explanation, and the book is worth every penny, so go spend US$40 and read up on it.

Definition at line 204 of file FwdStrategy.h.


Constructor & Destructor Documentation

prophet::BundleOfferComp::BundleOfferComp ( const FwdStrategyComp comp  )  [inline]

Definition at line 207 of file FwdStrategy.h.


Member Function Documentation

bool prophet::BundleOfferComp::operator() ( const Bundle a,
const Bundle b 
) const [inline]

Definition at line 210 of file FwdStrategy.h.

References comp_.


Member Data Documentation

pointer to actual comparator instance

Definition at line 215 of file FwdStrategy.h.

Referenced by operator()().


The documentation for this struct was generated from the following file:
Generated on Sun Nov 21 11:41:16 2010 for DTN Reference Implementation by  doxygen 1.6.3