xtd 0.2.0
Loading...
Searching...
No Matches
property_item.h
Go to the documentation of this file.
1
4#pragma once
5#include <xtd/iequatable>
6#include <xtd/object>
7#include <cstdint>
8#include <vector>
9
11namespace xtd {
13 namespace drawing {
16 namespace imaging {
26 class property_item final : public object, iequatable<property_item> {
27 public:
29 property_item() = default;
31
33
257 int32 id() const noexcept {return id_;}
480 void id(int32 id) noexcept {id_ = id;}
481
484 int32 len() const noexcept {return len_;}
487 void len(int32 len) noexcept {len_ = len;}
488
502 int16 type() const noexcept {return type_;}
516 void type(int16 type) noexcept {type_ = type;}
517
521 const std::vector<xtd::byte>& value() const noexcept {return value_;}
525 std::vector<xtd::byte>& value() noexcept {return value_;}
529 void value(const std::vector<xtd::byte>& value) noexcept {value_ = value;}
531
533
535 using object::equals;
536 bool equals(const property_item& value) const noexcept override {return id_ == value.id_ && len_ == value.len_ && type_ == value.type_ && value_ != value.value_;}
538
539 private:
540 int32 id_ = 0;
541 int32 len_ = 0;
542 int16 type_ = 1;
543 std::vector<xtd::byte> value_;
544 };
545 }
546 }
547}
Encapsulates a metadata property to be included in an image file. Not inheritable.
Definition property_item.h:26
void value(const std::vector< xtd::byte > &value) noexcept
Sets the value of the property item.
Definition property_item.h:529
int32 id() const noexcept
Gets the ID of the property.
Definition property_item.h:257
void type(int16 type) noexcept
Sets an integer that defines the type of data contained in the value property.
Definition property_item.h:516
int16 type() const noexcept
Gets an integer that defines the type of data contained in the value property.
Definition property_item.h:502
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:487
int32 len() const noexcept
Gets the length (in bytes) of the value property.
Definition property_item.h:484
const std::vector< xtd::byte > & value() const noexcept
Gets the value of the property item.
Definition property_item.h:521
void id(int32 id) noexcept
Sets the ID of the property.
Definition property_item.h:480
std::vector< xtd::byte > & value() noexcept
Gets the value of the property item.
Definition property_item.h:525
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.h:22
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
virtual bool equals(const object &obj) const noexcept
Determines whether the specified object is equal to the current object.
int16_t int16
Represents a 16-bit signed integer.
Definition int16.h:23
int32_t int32
Represents a 32-bit signed integer.
Definition int32.h:23
std::type_info type
Stores information about a type.
Definition type.h:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10