#include <sprk.h>

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

Public Member Functions

unsigned int GetValue () const
 
HPS::UTF8 GetValueAsString () const
 
HPS::Type ObjectType () const
 
TimeMetadataoperator= (TimeMetadata &&in_that)
 
void SetValue (unsigned int in_value)
 
 TimeMetadata ()
 
 TimeMetadata (Metadata const &in_that)
 
 TimeMetadata (TimeMetadata const &in_that)
 
 TimeMetadata (TimeMetadata &&in_that)
 
 TimeMetadata (char const *in_name, unsigned int 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::TimeMetadata
 
- 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 TimeMetadata class is a smart pointer. It represents a piece of time Metadata, i.e., a 32-bit integer to be interpreted as time_t.

Constructor & Destructor Documentation

◆ TimeMetadata() [1/5]

HPS::TimeMetadata::TimeMetadata ( )

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

◆ TimeMetadata() [2/5]

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

This constructor creates a TimeMetadata 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 TimeMetadata object. Otherwise the copy will fail and the resulting TimeMetadata will be invalid.

Parameters
in_thatThe source Metadata to copy.

◆ TimeMetadata() [3/5]

HPS::TimeMetadata::TimeMetadata ( TimeMetadata const &  in_that)

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

Parameters
in_thatThe source TimeMetadata to copy.

◆ TimeMetadata() [4/5]

HPS::TimeMetadata::TimeMetadata ( TimeMetadata &&  in_that)

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

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

◆ TimeMetadata() [5/5]

HPS::TimeMetadata::TimeMetadata ( char const *  in_name,
unsigned int  in_value 
)

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

Parameters
in_nameThe UTF8-encoded name for this TimeMetadata.
in_valueThe unsigned integer value (interpreted like time_t) for this TimeMetadata.

Member Function Documentation

◆ GetValue()

unsigned int HPS::TimeMetadata::GetValue ( ) const

Gets the unsigned integer value for this TimeMetadata.

Returns
The unsigned integer value for this TimeMetadata.

◆ GetValueAsString()

HPS::UTF8 HPS::TimeMetadata::GetValueAsString ( ) const

Gets the string represenation of the time value as returned by asctime() for this TimeMetadata.

Returns
The string representation of the time value as returned by asctime() for this TimeMetadata.

◆ ObjectType()

HPS::Type HPS::TimeMetadata::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=()

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

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

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

◆ SetValue()

void HPS::TimeMetadata::SetValue ( unsigned int  in_value)

Sets the unsigned integer value (interpreted like time_t) for this TimeMetadata.

Parameters
in_valueThe unsigned integer value (interpreted like time_t) for this TimeMetadata.

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