SST/macro
|
Network payload consisting of a value with sensible copy semantics. More...
#include <pair_payload.h>
Public Types | |
typedef sprockit::refcount_ptr< pair_payload< T1, T2 > > | ptr |
typedef sprockit::refcount_ptr< const pair_payload< T1, T2 > > | const_ptr |
Public Member Functions | |
virtual | ~pair_payload () |
payload::const_ptr | clone () const |
Clone this object. More... | |
std::pair< T1, T2 > | data_unconst () |
Access the underlying data in a non-const context. More... | |
const std::pair< T1, T2 > | 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 pair_payload< T1, T2 >::const_ptr | construct (const T1 &inval1, const T2 &inval2) |
Construct a new valuepayload. More... | |
Private Types | |
typedef pair_payload< T1, T2 > | PairPayload |
Private Member Functions | |
pair_payload (const T1 &inval1, const T2 &inval2, size_t size=sizeof(T1)+sizeof(T2)) | |
Construction time. More... | |
pair_payload (const pair_payload< T1, T2 > &other, size_t size=sizeof(T1)+sizeof(T2)) | |
Private copy constructor. More... | |
Private Attributes | |
T1 | data1_ |
The data we keep. More... | |
T2 | data2_ |
size_t | size_ |
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 28 of file pair_payload.h.
typedef sprockit::refcount_ptr<const pair_payload<T1, T2> > sstmac::pair_payload< T1, T2 >::const_ptr |
Definition at line 50 of file pair_payload.h.
|
private |
Definition at line 34 of file pair_payload.h.
typedef sprockit::refcount_ptr<pair_payload<T1, T2> > sstmac::pair_payload< T1, T2 >::ptr |
Definition at line 49 of file pair_payload.h.
|
inlineprivate |
Construction time.
Definition at line 37 of file pair_payload.h.
|
inlineprivate |
Private copy constructor.
Definition at line 43 of file pair_payload.h.
|
inlinevirtual |
Definition at line 53 of file pair_payload.h.
|
inlinevirtual |
Add operator.
other |
Definition at line 91 of file pair_payload.h.
References sstmac::pair_payload< T1, T2 >::construct(), sstmac::pair_payload< T1, T2 >::data(), and ptr_safe_cast.
|
inlinevirtual |
Definition at line 81 of file pair_payload.h.
References sstmac::pair_payload< T1, T2 >::size_.
|
inline |
Clone this object.
Definition at line 64 of file pair_payload.h.
|
inlinestatic |
Construct a new valuepayload.
Definition at line 58 of file pair_payload.h.
Referenced by sstmac::pair_payload< T1, T2 >::add(), sstmac::pairpayloadvector< T1, T2 >::add(), sstmac::pair_payload< T1, T2 >::max(), and sstmac::pair_payload< T1, T2 >::min().
|
inline |
Access the underlying data in a const context.
Definition at line 76 of file pair_payload.h.
References sstmac::pair_payload< T1, T2 >::data1_, and sstmac::pair_payload< T1, T2 >::data2_.
Referenced by sstmac::pair_payload< T1, T2 >::add(), sstmac::pairpayloadvector< T1, T2 >::add(), sstmac::pair_payload< T1, T2 >::equals(), sstmac::pairpayloadvector< T1, T2 >::equals(), and sstmac::pair_payload< T1, T2 >::min().
|
inline |
Access the underlying data in a non-const context.
Definition at line 70 of file pair_payload.h.
References sstmac::pair_payload< T1, T2 >::data1_, and sstmac::pair_payload< T1, T2 >::data2_.
|
inlinevirtual |
Equals comparator.
other |
Definition at line 144 of file pair_payload.h.
References sstmac::pair_payload< T1, T2 >::data(), and ptr_safe_cast.
|
inline |
Logical and comparator.
other |
Definition at line 179 of file pair_payload.h.
References spkt_throw_printf.
|
inline |
Logical or comparator.
other |
Definition at line 157 of file pair_payload.h.
References spkt_throw_printf.
|
inline |
Logical xor comparator.
other |
Definition at line 168 of file pair_payload.h.
References spkt_throw_printf.
|
inlinevirtual |
Greater than comparator, to only be used for the maxloc operation.
other |
Definition at line 125 of file pair_payload.h.
References sstmac::pair_payload< T1, T2 >::construct(), and ptr_safe_cast.
|
inlinevirtual |
Less than comparator, to only be used for the minloc mpi operation.
other |
Definition at line 106 of file pair_payload.h.
References sstmac::pair_payload< T1, T2 >::construct(), sstmac::pair_payload< T1, T2 >::data(), and ptr_safe_cast.
|
inlinevirtual |
Serialize this object into the spkt_serializer, for running in parallel simulation.
ser | the serializer to use |
Definition at line 190 of file pair_payload.h.
References spkt_throw_printf.
|
inlinevirtual |
|
mutableprivate |
The data we keep.
Definition at line 31 of file pair_payload.h.
Referenced by sstmac::pair_payload< T1, T2 >::data(), and sstmac::pair_payload< T1, T2 >::data_unconst().
|
mutableprivate |
Definition at line 32 of file pair_payload.h.
Referenced by sstmac::pair_payload< T1, T2 >::data(), and sstmac::pair_payload< T1, T2 >::data_unconst().
|
private |
Definition at line 33 of file pair_payload.h.
Referenced by sstmac::pairpayloadvector< T1, T2 >::add(), and sstmac::pair_payload< T1, T2 >::byte_length().