HOPS
HOPS class reference
Public Member Functions | Friends | List of all members
hops::MHO_ScalarContainer< XValueType > Class Template Reference

MHO_ScalarContainer, and wrapper class for storage of a scalar object. More...

#include <MHO_ScalarContainer.hh>

Inheritance diagram for hops::MHO_ScalarContainer< XValueType >:
[legend]

Public Member Functions

 MHO_ScalarContainer ()
 
 MHO_ScalarContainer (MHO_ScalarContainer &obj)
 
virtual ~MHO_ScalarContainer ()
 
uint64_t ComputeSerializedSize () const
 Calculates and returns the serialized size of an object. More...
 
uint64_t ComputeSerializedSize () const
 Function MHO_ScalarContainer<std::string>::ComputeSerializedSize. More...
 
virtual uint64_t GetSerializedSize () const override
 Getter for serialized size. More...
 
std::size_t GetSize () const
 Getter for size. More...
 
XValueType GetValue ()
 Getter for value. More...
 
virtual MHO_ClassVersion GetVersion () const override
 Getter for version. More...
 
void SetValue (const XValueType &value)
 Setter for value. More...
 
- Public Member Functions inherited from hops::MHO_NDArrayWrapper< XValueType, 0 >
 MHO_NDArrayWrapper ()
 
 MHO_NDArrayWrapper (const MHO_NDArrayWrapper &obj)
 
 MHO_NDArrayWrapper (const XValueType &data)
 
virtual ~MHO_NDArrayWrapper ()
 
XValueType GetData ()
 Getter for data. More...
 
std::size_t GetRank () const
 Getter for rank. More...
 
std::size_t GetSize () const
 Getter for size. More...
 
MHO_NDArrayWrapperoperator= (const MHO_NDArrayWrapper &rhs)
 
void SetArray (const XValueType &obj)
 Setter for array. More...
 
void SetData (const XValueType &value)
 Setter for data. More...
 
void ZeroArray ()
 Sets all elements in the array to zero. More...
 
- Public Member Functions inherited from hops::MHO_ExtensibleElement
 MHO_ExtensibleElement ()
 
virtual ~MHO_ExtensibleElement ()
 
void Accept (MHO_Visitor *aVisitor) override
 Visits all extensions of MHO_ExtensibleElement using given visitor. More...
 
template<class XExtensionType >
MHO_ExtendedElement< XExtensionType > * AsExtension ()
 Returns an extension of type XExtensionType if found in the list of extensions. More...
 
template<class XExtensionType >
bool HasExtension () const
 Checks if an extensible element has a specific extension type. More...
 
template<class XExtensionType >
MHO_ExtendedElement< XExtensionType > * MakeExtension ()
 Creates and adds a new extension of type XExtensionType to the list of extensions. More...
 
- Public Member Functions inherited from hops::MHO_Element
 MHO_Element ()
 
virtual ~MHO_Element ()
 
- Public Member Functions inherited from hops::MHO_Taggable
 MHO_Taggable ()
 
 MHO_Taggable (const MHO_Taggable &copy)
 
virtual ~MHO_Taggable ()
 
void ClearTags ()
 Clears all tags from the object. More...
 
void CopyFrom (const MHO_Taggable &copy_from_obj)
 Copies the contents of another MHO_Taggable object into this object. More...
 
virtual void CopyTags (const MHO_Taggable &rhs)
 Copies tags from rhs to this instance if rhs is not empty and has valid object. More...
 
void CopyTo (MHO_Taggable &copy_to_obj) const
 Copies the contents of this object to another MHO_Taggable object if they are not the same. More...
 
mho_json GetMetaDataAsJSON () const
 Getter for all meta data stored in this object as a json object. More...
 
MHO_Taggableoperator= (const MHO_Taggable &rhs)
 
void SetMetaDataAsJSON (mho_json obj)
 Setter for meta data as json. More...
 
- Public Member Functions inherited from hops::MHO_JSONWrapper
virtual ~MHO_JSONWrapper ()
 
void Clear ()
 Clears the internal object. More...
 
bool ContainsKey (const std::string &key) const
 Checks if a map contains a specific key. More...
 
std::vector< std::string > DumpKeys () const
 Dumps all keys from the internal object. More...
 
void DumpMap () const
 Dumps the contents of the map fObject to standard output. More...
 
bool HasKey (const char *char_key) const
 Checks if a key exists in the internal map. More...
 
bool HasKey (const std::string &key) const
 Checks if a key exists in the internal map. More...
 
template<typename XValueType >
void Insert (const std::string &key, const XValueType &value)
 Inserts or replaces an object in a map using a key and value. More...
 
MHO_JSONWrapperoperator= (const MHO_JSONWrapper &rhs)
 
template<>
bool Retrieve (const std::string &key, mho_json &value) const
 Retrieves a value from the JSON object by key and stores it in the provided reference. More...
 
template<typename XValueType >
bool Retrieve (const std::string &key, XValueType &value) const
 Retrieves a value from an object by key and casts it to the specified type. More...
 
- 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...
 
void SetObjectUUID (const MHO_UUID &uuid)
 Setter for object uuid. More...
 

Friends

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

Additional Inherited Members

- Public Types inherited from hops::MHO_NDArrayWrapper< XValueType, 0 >
typedef std::integral_constant< std::size_t, 0 > rank
 
using value_type = XValueType
 
- Protected Member Functions inherited from hops::MHO_JSONWrapper
 MHO_JSONWrapper ()
 
 MHO_JSONWrapper (const MHO_JSONWrapper &copy)
 
void SetObject (mho_json obj)
 Setter for object. More...
 
- Protected Attributes inherited from hops::MHO_NDArrayWrapper< XValueType, 0 >
XValueType fData
 
- Protected Attributes inherited from hops::MHO_ExtensibleElement
std::vector< MHO_Element * > fExtensions
 
- Protected Attributes inherited from hops::MHO_JSONWrapper
mho_json fObject
 

Detailed Description

template<typename XValueType>
class hops::MHO_ScalarContainer< XValueType >

MHO_ScalarContainer, and wrapper class for storage of a scalar object.

Author
J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
Date
Fri Oct 16 11:17:19 2020 -0400

Constructor & Destructor Documentation

◆ MHO_ScalarContainer() [1/2]

template<typename XValueType >
hops::MHO_ScalarContainer< XValueType >::MHO_ScalarContainer ( )
inline

◆ ~MHO_ScalarContainer()

template<typename XValueType >
virtual hops::MHO_ScalarContainer< XValueType >::~MHO_ScalarContainer ( )
inlinevirtual

◆ MHO_ScalarContainer() [2/2]

template<typename XValueType >
hops::MHO_ScalarContainer< XValueType >::MHO_ScalarContainer ( MHO_ScalarContainer< XValueType > &  obj)
inline

Member Function Documentation

◆ ComputeSerializedSize() [1/2]

template<typename XValueType >
uint64_t hops::MHO_ScalarContainer< XValueType >::ComputeSerializedSize ( ) const
inline

Calculates and returns the serialized size of an object.

Returns
The serialized size as a uint64_t.
Note
This is a virtual function.

◆ ComputeSerializedSize() [2/2]

uint64_t hops::MHO_ScalarContainer< std::string >::ComputeSerializedSize ( ) const
inline

Function MHO_ScalarContainer<std::string>::ComputeSerializedSize.

Returns
Return value (uint64_t MHO_ScalarContainer< std::string)

◆ GetSerializedSize()

template<typename XValueType >
virtual uint64_t hops::MHO_ScalarContainer< XValueType >::GetSerializedSize ( ) const
inlineoverridevirtual

Getter for serialized size.

Returns
Serialized size as a uint64_t.
Note
This is a virtual function.

Reimplemented from hops::MHO_Taggable.

◆ GetSize()

template<typename XValueType >
std::size_t hops::MHO_ScalarContainer< XValueType >::GetSize ( ) const
inline

Getter for size.

Returns
Size as std::size_t

◆ GetValue()

template<typename XValueType >
XValueType hops::MHO_ScalarContainer< XValueType >::GetValue ( )
inline

Getter for value.

Returns
Current value of type XValueType.

◆ GetVersion()

template<typename XValueType >
virtual MHO_ClassVersion hops::MHO_ScalarContainer< XValueType >::GetVersion ( ) const
inlineoverridevirtual

Getter for version.

Returns
MHO_ClassVersion version number
Note
This is a virtual function.

Reimplemented from hops::MHO_Taggable.

◆ SetValue()

template<typename XValueType >
void hops::MHO_ScalarContainer< XValueType >::SetValue ( const XValueType &  value)
inline

Setter for value.

Parameters
valueInput value of type const XValueType& to be assigned internally

Friends And Related Function Documentation

◆ operator<<

template<typename XValueType >
template<typename XStream >
XStream& operator<< ( XStream &  s,
const MHO_ScalarContainer< XValueType > &  aData 
)
friend

◆ operator>>

template<typename XValueType >
template<typename XStream >
XStream& operator>> ( XStream &  s,
MHO_ScalarContainer< XValueType > &  aData 
)
friend

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