HPS::StringMetadata Class Reference

#include <sprk.h>

Inheritance diagram for HPS::StringMetadata:
HPS::Metadata HPS::Sprocket HPS::Object

Public Member Functions

UTF8 GetValue () const
 
HPS::Type ObjectType () const
 
StringMetadataoperator= (StringMetadata &&in_that)
 
void SetValue (char const *in_value)
 
 StringMetadata ()
 
 StringMetadata (Metadata const &in_that)
 
 StringMetadata (StringMetadata const &in_that)
 
 StringMetadata (StringMetadata &&in_that)
 
 StringMetadata (char const *in_name, char const *in_value)
 
- Public Member Functions inherited from HPS::Sprocket
Sprocket (Sprocket &&in_that)
 
- Public Member Functions inherited from HPS::Object
virtual bool Empty () const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (HPS::Type in_mask) const
 
Object (Object const &that)
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
virtual HPS::Type Type () const
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::StringMetadata
 
- Static Public Attributes inherited from HPS::Object
static const HPS::Type staticType = HPS::Type::None
 

Additional Inherited Members

- Static Public Member Functions inherited from HPS::Object
template<typename T >
static intptr_t ClassID ()
 

Detailed Description

The StringMetadata class is a smart pointer. It represents a piece of string Metadata.

Constructor & Destructor Documentation

◆ StringMetadata() [1/5]

HPS::StringMetadata::StringMetadata ( )

The default constructor creates an uninitialized StringMetadata object. The Type() function will return Type::None.

◆ StringMetadata() [2/5]

HPS::StringMetadata::StringMetadata ( Metadata const &  in_that)

This constructor creates a StringMetadata object that shares the underlying smart-pointer of the source Metadata. The copy will only be successful if the source component is really an upcast of a StringMetadata object. Otherwise the copy will fail and the resulting StringMetadata will be invalid.

Parameters
in_thatThe source Metadata to copy.

◆ StringMetadata() [3/5]

HPS::StringMetadata::StringMetadata ( StringMetadata const &  in_that)

The copy constructor creates a StringMetadata object that shares the underlying smart-pointer of the source StringMetadata.

Parameters
in_thatThe source StringMetadata to copy.

◆ StringMetadata() [4/5]

HPS::StringMetadata::StringMetadata ( StringMetadata &&  in_that)

The move constructor creates a StringMetadata by transferring the underlying object of the rvalue reference to this StringMetadata.

Parameters
in_thatAn rvalue reference to a StringMetadata to take the underlying object from.

◆ StringMetadata() [5/5]

HPS::StringMetadata::StringMetadata ( char const *  in_name,
char const *  in_value 
)

This constructor creates a StringMetadata with a given name and value.

Parameters
in_nameThe UTF8-encoded name for this StringMetadata.
in_valueThe UTF8-encoded string value for this StringMetadata.

Member Function Documentation

◆ GetValue()

UTF8 HPS::StringMetadata::GetValue ( ) const

Gets the string value for this StringMetadata.

Returns
The string value for this StringMetadata.

◆ ObjectType()

HPS::Type HPS::StringMetadata::ObjectType ( ) const
inlinevirtual

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Returns
The declared type of the object in question, which may differ from the true, underlying type.

Reimplemented from HPS::Metadata.

◆ operator=()

StringMetadata& HPS::StringMetadata::operator= ( StringMetadata &&  in_that)

The move assignment operator transfers the underlying object of the rvalue reference to this StringMetadata.

Parameters
in_thatAn rvalue reference to a StringMetadata to take the underlying object from.
Returns
A reference to this StringMetadata.

◆ SetValue()

void HPS::StringMetadata::SetValue ( char const *  in_value)

Sets the string value for this StringMetadata.

Parameters
in_valueThe UTF8-encoded string value for this StringMetadata.

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