SST/macro
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
sstmac::pairpayloadvector< T1, T2 > Class Template Reference

Network payload consisting of a value with sensible copy semantics. More...

#include <pair_payload.h>

Inheritance diagram for sstmac::pairpayloadvector< T1, T2 >:
Inheritance graph
Collaboration diagram for sstmac::pairpayloadvector< T1, T2 >:
Collaboration graph

Classes

struct  structtype
 

Public Types

typedef sprockit::refcount_ptr< pairpayloadvector< T1, T2 > > ptr
 
typedef sprockit::refcount_ptr< const pairpayloadvector< T1, T2 > > const_ptr
 

Public Member Functions

virtual ~pairpayloadvector ()
 
payload::const_ptr clone () const
 Clone this object. More...
 
void * data_unconst ()
 Access the underlying data in a non-const context. More...
 
const void * data () const
 Access the underlying data in a const context. More...
 
virtual long byte_length () const
 
virtual const payload::const_ptr add (const payload::const_ptr &other) const
 Add operator. More...
 
virtual const payload::const_ptr min (const payload::const_ptr &other) const
 Less than comparator, to only be used for the minloc mpi operation. More...
 
virtual const payload::const_ptr max (const payload::const_ptr &other) const
 Greater than comparator, to only be used for the maxloc operation. More...
 
virtual bool equals (const payload::const_ptr &other) const
 Equals comparator. More...
 
const payload::const_ptr logical_or (const payload::const_ptr &other) const
 Logical or comparator. More...
 
const payload::const_ptr logical_xor (const payload::const_ptr &other) const
 Logical xor comparator. More...
 
const payload::const_ptr logical_and (const payload::const_ptr &other) const
 Logical and comparator. More...
 
virtual void serialize_order (sprockit::spkt_serializer *ser) const
 Serialize this object into the spkt_serializer, for running in parallel simulation. More...
 
virtual std::string to_string () const
 Strinfier. More...
 

Static Public Member Functions

static pairpayloadvector< T1, T2 >::const_ptr construct (void *start, size_t size, bool copy=true)
 Construct a new valuepayload. More...
 

Private Member Functions

 pairpayloadvector (void *start, size_t size, bool copy)
 Construction time. More...
 
 pairpayloadvector (const pairpayloadvector< T1, T2 > &other, size_t size)
 Private copy constructor. More...
 

Private Attributes

void * buf_
 The data we keep. More...
 
size_t size_
 

Detailed Description

template<typename T1, typename T2>
class sstmac::pairpayloadvector< T1, T2 >

Network payload consisting of a value with sensible copy semantics.

Don't use this for pointer types, since you will break assumptions about const-ness or protection of underlying data.

Definition at line 214 of file pair_payload.h.

Member Typedef Documentation

template<typename T1, typename T2>
typedef sprockit::refcount_ptr<const pairpayloadvector<T1, T2> > sstmac::pairpayloadvector< T1, T2 >::const_ptr

Definition at line 251 of file pair_payload.h.

template<typename T1, typename T2>
typedef sprockit::refcount_ptr<pairpayloadvector<T1, T2> > sstmac::pairpayloadvector< T1, T2 >::ptr

Definition at line 250 of file pair_payload.h.

Constructor & Destructor Documentation

template<typename T1, typename T2>
sstmac::pairpayloadvector< T1, T2 >::pairpayloadvector ( void *  start,
size_t  size,
bool  copy 
)
inlineprivate

Construction time.

Definition at line 227 of file pair_payload.h.

References memcpy().

Here is the call graph for this function:

template<typename T1, typename T2>
sstmac::pairpayloadvector< T1, T2 >::pairpayloadvector ( const pairpayloadvector< T1, T2 > &  other,
size_t  size 
)
inlineprivate

Private copy constructor.

Definition at line 241 of file pair_payload.h.

References sstmac::pairpayloadvector< T1, T2 >::buf_, and memcpy().

Here is the call graph for this function:

template<typename T1, typename T2>
virtual sstmac::pairpayloadvector< T1, T2 >::~pairpayloadvector ( )
inlinevirtual

Definition at line 254 of file pair_payload.h.

Member Function Documentation

template<typename T1, typename T2>
virtual const payload::const_ptr sstmac::pairpayloadvector< T1, T2 >::add ( const payload::const_ptr &  other) const
inlinevirtual

Add operator.

Parameters
other
Returns
a smart pointer to a new valuepayload object

Definition at line 293 of file pair_payload.h.

References sstmac::pairpayloadvector< T1, T2 >::structtype::a, sstmac::pairpayloadvector< T1, T2 >::structtype::b, sstmac::pair_payload< T1, T2 >::construct(), sstmac::pair_payload< T1, T2 >::data(), ptr_safe_cast, and sstmac::pair_payload< T1, T2 >::size_.

Here is the call graph for this function:

template<typename T1, typename T2>
virtual long sstmac::pairpayloadvector< T1, T2 >::byte_length ( ) const
inlinevirtual

Definition at line 283 of file pair_payload.h.

template<typename T1, typename T2>
payload::const_ptr sstmac::pairpayloadvector< T1, T2 >::clone ( ) const
inline

Clone this object.

Definition at line 266 of file pair_payload.h.

template<typename T1, typename T2>
static pairpayloadvector<T1, T2>::const_ptr sstmac::pairpayloadvector< T1, T2 >::construct ( void *  start,
size_t  size,
bool  copy = true 
)
inlinestatic

Construct a new valuepayload.

Definition at line 260 of file pair_payload.h.

template<typename T1, typename T2>
const void* sstmac::pairpayloadvector< T1, T2 >::data ( ) const
inline

Access the underlying data in a const context.

Definition at line 278 of file pair_payload.h.

template<typename T1, typename T2>
void* sstmac::pairpayloadvector< T1, T2 >::data_unconst ( )
inline

Access the underlying data in a non-const context.

Definition at line 272 of file pair_payload.h.

template<typename T1, typename T2>
virtual bool sstmac::pairpayloadvector< T1, T2 >::equals ( const payload::const_ptr &  other) const
inlinevirtual

Equals comparator.

Parameters
other
Returns

Definition at line 339 of file pair_payload.h.

References sstmac::pairpayloadvector< T1, T2 >::structtype::a, sstmac::pairpayloadvector< T1, T2 >::structtype::b, sstmac::pair_payload< T1, T2 >::data(), and ptr_safe_cast.

Here is the call graph for this function:

template<typename T1, typename T2>
const payload::const_ptr sstmac::pairpayloadvector< T1, T2 >::logical_and ( const payload::const_ptr &  other) const
inline

Logical and comparator.

Parameters
other
Returns

Definition at line 381 of file pair_payload.h.

References spkt_throw_printf.

template<typename T1, typename T2>
const payload::const_ptr sstmac::pairpayloadvector< T1, T2 >::logical_or ( const payload::const_ptr &  other) const
inline

Logical or comparator.

Parameters
other
Returns

Definition at line 359 of file pair_payload.h.

References spkt_throw_printf.

template<typename T1, typename T2>
const payload::const_ptr sstmac::pairpayloadvector< T1, T2 >::logical_xor ( const payload::const_ptr &  other) const
inline

Logical xor comparator.

Parameters
other
Returns

Definition at line 370 of file pair_payload.h.

References spkt_throw_printf.

template<typename T1, typename T2>
virtual const payload::const_ptr sstmac::pairpayloadvector< T1, T2 >::max ( const payload::const_ptr &  other) const
inlinevirtual

Greater than comparator, to only be used for the maxloc operation.

Parameters
other
Returns

Definition at line 328 of file pair_payload.h.

References spkt_throw_printf.

template<typename T1, typename T2>
virtual const payload::const_ptr sstmac::pairpayloadvector< T1, T2 >::min ( const payload::const_ptr &  other) const
inlinevirtual

Less than comparator, to only be used for the minloc mpi operation.

Parameters
other
Returns

Definition at line 316 of file pair_payload.h.

References spkt_throw_printf.

template<typename T1, typename T2>
virtual void sstmac::pairpayloadvector< T1, T2 >::serialize_order ( sprockit::spkt_serializer *  ser) const
inlinevirtual

Serialize this object into the spkt_serializer, for running in parallel simulation.

Parameters
serthe serializer to use

Definition at line 392 of file pair_payload.h.

References spkt_throw_printf.

template<typename T1, typename T2>
virtual std::string sstmac::pairpayloadvector< T1, T2 >::to_string ( ) const
inlinevirtual

Strinfier.

Returns
a std::string description

Definition at line 402 of file pair_payload.h.

Member Data Documentation

template<typename T1, typename T2>
void* sstmac::pairpayloadvector< T1, T2 >::buf_
private

The data we keep.

Definition at line 223 of file pair_payload.h.

Referenced by sstmac::pairpayloadvector< T1, T2 >::pairpayloadvector().

template<typename T1, typename T2>
size_t sstmac::pairpayloadvector< T1, T2 >::size_
private

Definition at line 224 of file pair_payload.h.


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