#include <sprk.h>

Inheritance diagram for HPS::Metadata:
HPS::Sprocket HPS::Object HPS::BooleanMetadata HPS::DoubleMetadata HPS::IntegerMetadata HPS::StringMetadata HPS::TimeMetadata HPS::UnsignedIntegerMetadata

Public Member Functions

virtual void Assign (Metadata const &in_that)
 
bool Equals (Metadata const &in_that) const
 
HPS::UTF8 GetName () const
 
 Metadata ()
 
 Metadata (Metadata const &in_that)
 
 Metadata (Metadata &&in_that)
 
 Metadata (char const *in_name)
 
HPS::Type ObjectType () const
 
bool operator!= (Metadata const &in_that) const
 
Metadataoperator= (Metadata const &in_that)
 
Metadataoperator= (Metadata &&in_that)
 
bool operator== (Metadata const &in_that) const
 
void SetName (char const *in_name)
 
- 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::Metadata
 
- 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 Metadata class is a smart pointer. It represents a variety of metadata, i.e., a (name, value) pair, which might be associated with a Component, e.g., IDs, names, layers, user-defined or format-specific attributes, etc.

Constructor & Destructor Documentation

◆ Metadata() [1/4]

HPS::Metadata::Metadata ( )

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

◆ Metadata() [2/4]

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

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

Parameters
in_thatThe source Metadata to copy.

◆ Metadata() [3/4]

HPS::Metadata::Metadata ( Metadata &&  in_that)

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

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

◆ Metadata() [4/4]

HPS::Metadata::Metadata ( char const *  in_name)

This constructor creates a Metadata with a given name.

Parameters
in_nameThe UTF8-encoded name for this Metadata.

Member Function Documentation

◆ Assign()

virtual void HPS::Metadata::Assign ( Metadata const &  in_that)
virtual

Share the underlying smart-pointer of the Metadata source.

Parameters
in_thatThe Metadata source of the assignment.
Returns
A reference to this Metadata.

◆ Equals()

bool HPS::Metadata::Equals ( Metadata const &  in_that) const

Check if the source Metadata points to the same underlying impl as this Metadata.

Parameters
in_thatThe source Metadata to compare to this Metadata.
Returns
true if the objects reference the same impl, false otherwise.

◆ GetName()

HPS::UTF8 HPS::Metadata::GetName ( ) const

Gets the name for this Metadata.

Returns
The name for this Metadata.

◆ ObjectType()

HPS::Type HPS::Metadata::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::Object.

Reimplemented in HPS::BooleanMetadata, HPS::TimeMetadata, HPS::StringMetadata, HPS::DoubleMetadata, HPS::UnsignedIntegerMetadata, and HPS::IntegerMetadata.

◆ operator!=()

bool HPS::Metadata::operator!= ( Metadata const &  in_that) const

Check if the source Metadata points to a different impl than this Metadata.

Parameters
in_thatThe source Metadata to compare to this Metadata.
Returns
true if the objects reference different impls, false otherwise.

◆ operator=() [1/2]

Metadata& HPS::Metadata::operator= ( Metadata const &  in_that)

Share the underlying smart-pointer of the Metadata source.

Parameters
in_thatThe Metadata source of the assignment.
Returns
A reference to this Metadata.

◆ operator=() [2/2]

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

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

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

◆ operator==()

bool HPS::Metadata::operator== ( Metadata const &  in_that) const

Check if the source Metadata points to the same underlying impl as this Metadata.

Parameters
in_thatThe source Metadata to compare to this Metadata.
Returns
true if the objects reference the same impl, false otherwise.

◆ SetName()

void HPS::Metadata::SetName ( char const *  in_name)

Sets the name for this Metadata.

Parameters
in_nameA UTF8-encoded name for this Metadata.

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