IntegerMetadata
-
class HPS::IntegerMetadata : public HPS::Metadata
The IntegerMetadata class is a smart pointer. It represents a piece of integer Metadata.
Public Functions
-
int GetValue() const
Gets the integer value for this IntegerMetadata.
- Returns
The integer value for this IntegerMetadata.
-
IntegerMetadata()
The default constructor creates an uninitialized IntegerMetadata object. The Type() function will return Type::None.
-
IntegerMetadata(char const *in_name, int in_value)
This constructor creates an IntegerMetadata with a given name and value.
- Parameters
in_name – The UTF8-encoded name for this IntegerMetadata.
in_value – The integer value for this IntegerMetadata.
-
IntegerMetadata(IntegerMetadata &&in_that)
The move constructor creates an IntegerMetadata by transferring the underlying object of the rvalue reference to this IntegerMetadata.
- Parameters
in_that – An rvalue reference to an IntegerMetadata to take the underlying object from.
-
IntegerMetadata(IntegerMetadata const &in_that)
The copy constructor creates an IntegerMetadata object that shares the underlying smart-pointer of the source IntegerMetadata.
- Parameters
in_that – The source IntegerMetadata to copy.
-
IntegerMetadata(Metadata const &in_that)
This constructor creates an IntegerMetadata 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 an IntegerMetadata object. Otherwise the copy will fail and the resulting IntegerMetadata will be invalid.
- Parameters
in_that – The source Metadata to copy.
-
inline virtual HPS::Type ObjectType() const
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.
-
IntegerMetadata &operator=(IntegerMetadata &&in_that)
The move assignment operator transfers the underlying object of the rvalue reference to this IntegerMetadata.
- Parameters
in_that – An rvalue reference to an IntegerMetadata to take the underlying object from.
- Returns
A reference to this IntegerMetadata.
-
void SetValue(int in_value)
Sets the integer value for this IntegerMetadata.
- Parameters
in_value – The integer value for this IntegerMetadata.
-
virtual ~IntegerMetadata()
Public Static Attributes
-
static const HPS::Type staticType = HPS::Type::IntegerMetadata
-
int GetValue() const