xtd 0.2.0
property_item.h
Go to the documentation of this file.
1 #pragma once
5 #include <xtd/object>
6 #include <cstdint>
7 #include <vector>
8 
10 namespace xtd {
12  namespace drawing {
15  namespace imaging {
25  class property_item final : public object {
26  public:
28  property_item() = default;
30 
32 
256  int32 id() const noexcept {return id_;}
479  void id(int32 id) noexcept {id_ = id;}
480 
483  int32 len() const noexcept {return len_;}
486  void len(int32 len) noexcept {len_ = len;}
487 
501  int16 type() const noexcept {return type_;}
515  void type(int16 type) noexcept {type_ = type;}
516 
520  const std::vector<xtd::byte>& value() const noexcept {return value_;}
524  std::vector<xtd::byte>& value() noexcept {return value_;}
528  void value(const std::vector<xtd::byte>& value) noexcept {value_ = value;}
530 
531  private:
532  int32 id_ = 0;
533  int32 len_ = 0;
534  int16 type_ = 1;
535  std::vector<xtd::byte> value_;
536  };
537  }
538  }
539 }
std::type_info type
Stores information about a type.
Definition: types.h:217
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
int32 id() const noexcept
Gets the ID of the property.
Definition: property_item.h:256
Encapsulates a metadata property to be included in an image file. Not inheritable.
Definition: property_item.h:25
int32 len() const noexcept
Gets the length (in bytes) of the value property.
Definition: property_item.h:483
int16 type() const noexcept
Gets an integer that defines the type of data contained in the value property.
Definition: property_item.h:501
void value(const std::vector< xtd::byte > &value) noexcept
Sets the value of the property item.
Definition: property_item.h:528
int_least16_t int16
Represents a 16-bit signed integer.
Definition: types.h:118
void len(int32 len) noexcept
Sets the length (in bytes) of the value property. &param len An integer that represents the length (i...
Definition: property_item.h:486
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:32
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
const std::vector< xtd::byte > & value() const noexcept
Gets the value of the property item.
Definition: property_item.h:520
std::vector< xtd::byte > & value() noexcept
Gets the value of the property item.
Definition: property_item.h:524
void type(int16 type) noexcept
Sets an integer that defines the type of data contained in the value property.
Definition: property_item.h:515
void id(int32 id) noexcept
Sets the ID of the property.
Definition: property_item.h:479