PCL
pcl::Property Class Reference

An identifier-value association. More...

#include <Property.h>

Public Types

using data_type = value_type::data_type
 
using identifier_type = IsoString
 
using value_type = Variant
 

Public Member Functions

 Property ()=default
 
 Property (const identifier_type &identifier)
 
 Property (const identifier_type &identifier, const value_type &value)
 
 Property (const Property &)=default
 
 Property (Property &&)=default
 
virtual ~Property ()
 
PropertyDescription Description () const
 
const identifier_typeId () const
 
const identifier_typeIdentifier () const
 
bool IsValid () const
 
bool operator< (const Property &other) const
 
Propertyoperator= (const Property &)=default
 
Propertyoperator= (Property &&)=default
 
bool operator== (const Property &other) const
 
void SetValue (const value_type &value)
 
data_type Type () const
 
const value_typeValue () const
 

Static Public Member Functions

static bool IsValidIdentifier (const IsoString &id)
 

Detailed Description

Property is a simple identifier-value association, useful to transport properties associated with views and images on the PixInsight platform.

The View and FileFormatInstance classes include member functions to generate PropertyArray containers, namely View::Properties(), FileFormatInstance::ReadProperties() and FileFormatInstance::ReadImageProperties().

Definition at line 78 of file Property.h.

Member Typedef Documentation

◆ data_type

using pcl::Property::data_type = value_type::data_type

Represents the data type of a property value.

Definition at line 95 of file Property.h.

◆ identifier_type

Represents the string class used to transport property identifiers.

Definition at line 85 of file Property.h.

◆ value_type

Represents the class used to transport property values.

Definition at line 90 of file Property.h.

Constructor & Destructor Documentation

◆ Property() [1/5]

pcl::Property::Property ( )
default

Default constructor. Constructs an invalid Property object with an empty property identifier and an invalid property value.

◆ Property() [2/5]

pcl::Property::Property ( const Property )
default

Copy constructor.

◆ Property() [3/5]

pcl::Property::Property ( Property &&  )
default

Move constructor.

◆ Property() [4/5]

pcl::Property::Property ( const identifier_type identifier,
const value_type value 
)
inline

Constructs a Property object with the specified property identifier and property value.

Definition at line 117 of file Property.h.

◆ Property() [5/5]

pcl::Property::Property ( const identifier_type identifier)
inline

Constructs a Property object with the specified property identifier and an undefined (invalid) property value.

Definition at line 127 of file Property.h.

◆ ~Property()

virtual pcl::Property::~Property ( )
inlinevirtual

Virtual destructor.

Definition at line 145 of file Property.h.

Member Function Documentation

◆ Description()

PropertyDescription pcl::Property::Description ( ) const
inline

Returns a description of this property, including its identifier and value data type.

Definition at line 196 of file Property.h.

◆ Id()

const identifier_type& pcl::Property::Id ( ) const
inline

Returns the property identifier. This function is a convenience synonym for Identifier().

Definition at line 161 of file Property.h.

Referenced by pcl::FileFormatInstance::WriteImageProperty(), and pcl::FileFormatInstance::WriteProperty().

◆ Identifier()

const identifier_type& pcl::Property::Identifier ( ) const
inline

Returns the property identifier.

Definition at line 152 of file Property.h.

◆ IsValid()

bool pcl::Property::IsValid ( ) const
inline

Returns true iff this property is valid. A valid property has a valid identifier and a valid value.

Definition at line 227 of file Property.h.

◆ IsValidIdentifier()

static bool pcl::Property::IsValidIdentifier ( const IsoString id)
inlinestatic

Returns true iff the specified string id is a valid property identifier. Refer to XISF::IsValidPropertyId() for property identifier syntax rules.

Definition at line 206 of file Property.h.

Referenced by pcl::XISF::IsValidPropertyId().

◆ operator<()

bool pcl::Property::operator< ( const Property other) const
inline

Less than operator. Returns true iff this property precedes other property.

For comparisons of Property objects, only their identifiers are taken into account. Keep in mind that this operator compares properties, not their values.

Definition at line 252 of file Property.h.

◆ operator=() [1/2]

Property& pcl::Property::operator= ( const Property )
default

Copy assignment operator. Returns a reference to this object.

◆ operator=() [2/2]

Property& pcl::Property::operator= ( Property &&  )
default

Move assignment operator. Returns a reference to this object.

◆ operator==()

bool pcl::Property::operator== ( const Property other) const
inline

Equality operator. Returns true iff this property is equal to other property.

Two Property objects are equal if their identifiers are equal. Keep in mind that this operator compares properties, not their values.

Definition at line 239 of file Property.h.

◆ SetValue()

void pcl::Property::SetValue ( const value_type value)
inline

Assigns the specified value to this property. The previous value will be replaced with the new one and hence will be lost.

Definition at line 178 of file Property.h.

◆ Type()

data_type pcl::Property::Type ( ) const
inline

Returns the data type of this property, which is the data type of its value.

Definition at line 187 of file Property.h.

◆ Value()

const value_type& pcl::Property::Value ( ) const
inline

Returns the property value.

Definition at line 169 of file Property.h.

Referenced by pcl::FileFormatInstance::WriteImageProperty(), and pcl::FileFormatInstance::WriteProperty().


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