HOPS
HOPS class reference
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
hops::MHO_AxisPack< XAxisTypeS > Class Template Reference

Class MHO_AxisPack. More...

#include <MHO_AxisPack.hh>

Inheritance diagram for hops::MHO_AxisPack< XAxisTypeS >:
[legend]

Public Types

typedef std::tuple< XAxisTypeS... > axis_pack_tuple_type
 
typedef std::integral_constant< std::size_t, sizeof...(XAxisTypeS) > NAXES
 

Public Member Functions

 MHO_AxisPack ()
 
 MHO_AxisPack (const MHO_AxisPack &obj)
 
 MHO_AxisPack (const std::size_t *dim)
 
virtual ~MHO_AxisPack ()
 
virtual uint64_t GetSerializedSize () const override
 Getter for serialized size. More...
 
virtual MHO_AxisPackoperator= (const MHO_AxisPack &rhs)
 
- Public Member Functions inherited from hops::MHO_Serializable
 MHO_Serializable ()
 
 MHO_Serializable (const MHO_UUID &uuid)
 
 MHO_Serializable (std::size_t n)
 
virtual ~MHO_Serializable ()
 
MHO_UUID GetObjectUUID () const
 Getter for object uuid. More...
 
virtual MHO_UUID GetTypeUUID () const
 Getter for type uuid. More...
 
virtual MHO_ClassVersion GetVersion () const
 Getter for version. More...
 
void SetObjectUUID (const MHO_UUID &uuid)
 Setter for object uuid. More...
 

Protected Member Functions

template<std::size_t N = 0>
std::enable_if<(N==sizeof...(XAxisTypeS)), void >::type compute_total_size (uint64_t &) const
 Inductively computes and adds total serialized size of tuple elements to uint64_t& (needed for streaming). More...
 
template<std::size_t N = 0>
std::enable_if<(N< sizeof...(XAxisTypeS)), void >::type compute_total_size (uint64_t &total_size) const
 Recursively computes and adds serialized size of Nth XAxisTypeS element to total_size. More...
 
template<std::size_t N = 0>
std::enable_if<(N==sizeof...(XAxisTypeS)), void >::type copy (const MHO_AxisPack &) const
 used for copying the full tuple from one axis pack to another More...
 
template<std::size_t N = 0>
std::enable_if<(N< sizeof...(XAxisTypeS)), void >::type copy (const MHO_AxisPack &rhs)
 Copies an axis pack recursively using template meta-programming. More...
 
template<std::size_t N = 0>
std::enable_if<(N==sizeof...(XAxisTypeS)), void >::type resize_axis_pack (const std::size_t *)
 inductive access to all elements of the tuple, so we can re-size them from an array More...
 
template<std::size_t N = 0>
std::enable_if<(N< sizeof...(XAxisTypeS)), void >::type resize_axis_pack (const std::size_t *dim)
 Resize each element of the axis pack using the dimensions specified in dim. More...
 

Friends

template<typename XStream >
XStream & operator<< (XStream &s, const MHO_AxisPack &aData)
 
template<typename XStream >
XStream & operator>> (XStream &s, MHO_AxisPack &aData)
 

Detailed Description

template<typename... XAxisTypeS>
class hops::MHO_AxisPack< XAxisTypeS >

Class MHO_AxisPack.

a packaged set of axes (XAxisTypeS are expected to inherit from MHO_Axis)

Author
J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
Date
Mon Aug 17 12:42:31 2020 -0400

Member Typedef Documentation

◆ axis_pack_tuple_type

template<typename... XAxisTypeS>
typedef std::tuple< XAxisTypeS... > hops::MHO_AxisPack< XAxisTypeS >::axis_pack_tuple_type

◆ NAXES

template<typename... XAxisTypeS>
typedef std::integral_constant< std::size_t, sizeof...(XAxisTypeS) > hops::MHO_AxisPack< XAxisTypeS >::NAXES

Constructor & Destructor Documentation

◆ MHO_AxisPack() [1/3]

template<typename... XAxisTypeS>
hops::MHO_AxisPack< XAxisTypeS >::MHO_AxisPack ( )
inline

◆ MHO_AxisPack() [2/3]

template<typename... XAxisTypeS>
hops::MHO_AxisPack< XAxisTypeS >::MHO_AxisPack ( const std::size_t *  dim)
inline

◆ MHO_AxisPack() [3/3]

template<typename... XAxisTypeS>
hops::MHO_AxisPack< XAxisTypeS >::MHO_AxisPack ( const MHO_AxisPack< XAxisTypeS > &  obj)
inline

◆ ~MHO_AxisPack()

template<typename... XAxisTypeS>
virtual hops::MHO_AxisPack< XAxisTypeS >::~MHO_AxisPack ( )
inlinevirtual

Member Function Documentation

◆ compute_total_size() [1/2]

template<typename... XAxisTypeS>
template<std::size_t N = 0>
std::enable_if< (N == sizeof...(XAxisTypeS)), void >::type hops::MHO_AxisPack< XAxisTypeS >::compute_total_size ( uint64_t &  ) const
inlineprotected

Inductively computes and adds total serialized size of tuple elements to uint64_t& (needed for streaming).

Template Parameters
NTemplate parameter (size of the axis pack)
Parameters
!total_sizeParameter description

◆ compute_total_size() [2/2]

template<typename... XAxisTypeS>
template<std::size_t N = 0>
std::enable_if< (N < sizeof...(XAxisTypeS)), void >::type hops::MHO_AxisPack< XAxisTypeS >::compute_total_size ( uint64_t &  total_size) const
inlineprotected

Recursively computes and adds serialized size of Nth XAxisTypeS element to total_size.

Template Parameters
NTemplate parameter N
Parameters
total_sizeReference to uint64_t accumulating total serialized size
Returns
void

◆ copy() [1/2]

template<typename... XAxisTypeS>
template<std::size_t N = 0>
std::enable_if< (N == sizeof...(XAxisTypeS)), void >::type hops::MHO_AxisPack< XAxisTypeS >::copy ( const MHO_AxisPack< XAxisTypeS > &  ) const
inlineprotected

used for copying the full tuple from one axis pack to another

Template Parameters
NTemplate parameter N
Parameters
MHO_AxisPack&Parameter description

◆ copy() [2/2]

template<typename... XAxisTypeS>
template<std::size_t N = 0>
std::enable_if< (N < sizeof...(XAxisTypeS)), void >::type hops::MHO_AxisPack< XAxisTypeS >::copy ( const MHO_AxisPack< XAxisTypeS > &  rhs)
inlineprotected

Copies an axis pack recursively using template meta-programming.

Template Parameters
NTemplate parameter N
Parameters
rhsThe source axis pack to copy from.
Returns
void (not explicitly returned)

◆ GetSerializedSize()

template<typename... XAxisTypeS>
virtual uint64_t hops::MHO_AxisPack< XAxisTypeS >::GetSerializedSize ( ) const
inlineoverridevirtual

◆ operator=()

template<typename... XAxisTypeS>
virtual MHO_AxisPack& hops::MHO_AxisPack< XAxisTypeS >::operator= ( const MHO_AxisPack< XAxisTypeS > &  rhs)
inlinevirtual

◆ resize_axis_pack() [1/2]

template<typename... XAxisTypeS>
template<std::size_t N = 0>
std::enable_if< (N == sizeof...(XAxisTypeS)), void >::type hops::MHO_AxisPack< XAxisTypeS >::resize_axis_pack ( const std::size_t *  )
inlineprotected

inductive access to all elements of the tuple, so we can re-size them from an array

Template Parameters
NTemplate parameter (size of the axis pack)
Parameters
!dimParameter description

◆ resize_axis_pack() [2/2]

template<typename... XAxisTypeS>
template<std::size_t N = 0>
std::enable_if< (N < sizeof...(XAxisTypeS)), void >::type hops::MHO_AxisPack< XAxisTypeS >::resize_axis_pack ( const std::size_t *  dim)
inlineprotected

Resize each element of the axis pack using the dimensions specified in dim.

Template Parameters
NTemplate parameter (size of the axis pack)
Parameters
dimInput dimension sizes for resizing.

Friends And Related Function Documentation

◆ operator<<

template<typename... XAxisTypeS>
template<typename XStream >
XStream& operator<< ( XStream &  s,
const MHO_AxisPack< XAxisTypeS > &  aData 
)
friend

◆ operator>>

template<typename... XAxisTypeS>
template<typename XStream >
XStream& operator>> ( XStream &  s,
MHO_AxisPack< XAxisTypeS > &  aData 
)
friend

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