{
}
+lst::type::cuptr lst::integer_type::copy() const
+{
+ return lttng::make_unique<integer_type>(
+ alignment, byte_order, size, signedness_, base_, roles_);
+}
+
bool lst::integer_type::_is_equal(const type &base_other) const noexcept
{
const auto& other = static_cast<decltype(*this)&>(base_other);
typeid(*this)));
}
+lst::type::cuptr lst::floating_point_type::copy() const
+{
+ return lttng::make_unique<floating_point_type>(
+ alignment, byte_order, exponent_digits, mantissa_digits);
+}
+
void lst::floating_point_type::accept(type_visitor& visitor) const
{
visitor.visit(*this);
return array_type::_is_equal(base_other) && this->length == other.length;
}
+lst::type::cuptr lst::static_length_array_type::copy() const
+{
+ return lttng::make_unique<static_length_array_type>(
+ alignment, element_type->copy(), length);
+}
+
void lst::static_length_array_type::accept(type_visitor& visitor) const
{
visitor.visit(*this);
this->length_field_location == other.length_field_location;
}
+lst::type::cuptr lst::dynamic_length_array_type::copy() const
+{
+ return lttng::make_unique<dynamic_length_array_type>(
+ alignment, element_type->copy(), length_field_location);
+}
+
void lst::dynamic_length_array_type::accept(type_visitor& visitor) const
{
visitor.visit(*this);
return length_bytes == other.length_bytes && roles_ == other.roles_;
}
+lst::type::cuptr lst::static_length_blob_type::copy() const
+{
+ return lttng::make_unique<static_length_blob_type>(alignment, length_bytes, roles_);
+}
+
void lst::static_length_blob_type::accept(type_visitor& visitor) const
{
visitor.visit(*this);
return length_field_location == other.length_field_location;
}
+lst::type::cuptr lst::dynamic_length_blob_type::copy() const
+{
+ return lttng::make_unique<dynamic_length_blob_type>(alignment, length_field_location);
+}
+
void lst::dynamic_length_blob_type::accept(type_visitor& visitor) const
{
visitor.visit(*this);
return string_type::_is_equal(base_other) && this->length == other.length;
}
+lst::type::cuptr lst::static_length_string_type::copy() const
+{
+ return lttng::make_unique<static_length_string_type>(alignment, encoding_, length);
+}
+
void lst::static_length_string_type::accept(type_visitor& visitor) const
{
visitor.visit(*this);
this->length_field_location == other.length_field_location;
}
+lst::type::cuptr lst::dynamic_length_string_type::copy() const
+{
+ return lttng::make_unique<dynamic_length_string_type>(
+ alignment, encoding_, length_field_location);
+}
+
void lst::dynamic_length_string_type::accept(type_visitor& visitor) const
{
visitor.visit(*this);
{
}
+lst::type::cuptr lst::null_terminated_string_type::copy() const
+{
+ return lttng::make_unique<null_terminated_string_type>(alignment, encoding_);
+}
+
void lst::null_terminated_string_type::accept(type_visitor& visitor) const
{
visitor.visit(*this);
return fields_are_equal(this->fields_, other.fields_);
}
+lst::type::cuptr lst::structure_type::copy() const
+{
+ structure_type::fields copy_of_fields;
+
+ copy_of_fields.reserve(fields_.size());
+ for (const auto& field : fields_) {
+ copy_of_fields.emplace_back(lttng::make_unique<lst::field>(
+ field->name, field->get_type().copy()));
+ }
+
+ return lttng::make_unique<structure_type>(alignment, std::move(copy_of_fields));
+}
+
void lst::structure_type::accept(type_visitor& visitor) const
{
visitor.visit(*this);