type(in_alignment),
byte_order{in_byte_order},
size{in_size},
- signedness{in_signedness},
- base{in_base}
+ signedness_{in_signedness},
+ base_{in_base}
{
}
return this->byte_order == other.byte_order &&
this->size == other.size &&
- this->signedness == other.signedness &&
- this->base == other.base;
+ this->signedness_ == other.signedness_ &&
+ this->base_ == other.base_;
}
void lst::integer_type::accept(type_visitor& visitor) const
}
lst::string_type::string_type(unsigned int in_alignment, enum encoding in_encoding) :
- type(in_alignment), encoding{in_encoding}
+ type(in_alignment), encoding_{in_encoding}
{
}
{
const auto& other = static_cast<decltype(*this)&>(base_other);
- return this->encoding == other.encoding;
+ return this->encoding_ == other.encoding_;
}
lst::static_length_string_type::static_length_string_type(
const enum byte_order byte_order;
const unsigned int size;
- const signedness signedness;
- const base base;
+ /*
+ * signedness and base are suffixed with '_' to work-around a bug in older
+ * GCCs (before 6) that do not recognize hidden/shadowed enumeration as valid
+ * nested-name-specifiers.
+ */
+ const signedness signedness_;
+ const base base_;
protected:
virtual bool _is_equal(const type& other) const noexcept override;
string_type(unsigned int alignment, enum encoding encoding);
- const encoding encoding;
+ /*
+ * encoding is suffixed with '_' to work-around a bug in older
+ * GCCs (before 6) that do not recognize hidden/shadowed enumeration as valid
+ * nested-name-specifiers.
+ */
+ const encoding encoding_;
protected:
virtual bool _is_equal(const type& base_other) const noexcept override;
lttng::sessiond::trace::stream_class::stream_class(
unsigned int in_id, enum header_type in_header_type) :
- id{in_id}, header_type{in_header_type}
+ id{in_id}, header_type_{in_header_type}
{
}
virtual const lttng::sessiond::trace::type& get_context() const;
const unsigned int id;
- const header_type header_type;
+ /*
+ * header_type is suffixed with '_' to work-around a bug in older
+ * GCCs (before 6) that do not recognize hidden/shadowed enumeration as valid
+ * nested-name-specifiers.
+ */
+ const header_type header_type_;
protected:
stream_class(unsigned int id, enum header_type header_type);
fmt::arg("alignment", type.alignment));
/* Defaults to unsigned. */
- if (type.signedness == lst::integer_type::signedness::SIGNED) {
+ if (type.signedness_ == lst::integer_type::signedness::SIGNED) {
_description += " signed = true;";
}
/* Defaults to 10. */
- if (type.base != lst::integer_type::base::DECIMAL) {
+ if (type.base_ != lst::integer_type::base::DECIMAL) {
unsigned int base;
- switch (type.base) {
+ switch (type.base_) {
case lst::integer_type::base::BINARY:
base = 2;
break;
default:
LTTNG_THROW_ERROR(fmt::format(
"Unexpected base encountered while serializing integer type to TSDL: base = {}",
- (int) type.base));
+ (int) type.base_));
}
_description += fmt::format(" base = {};", base);
virtual void visit(const lst::null_terminated_string_type& type) override final
{
/* Defaults to UTF-8. */
- if (type.encoding == lst::null_terminated_string_type::encoding::ASCII) {
+ if (type.encoding_ == lst::null_terminated_string_type::encoding::ASCII) {
_description += "string { encoding = ASCII }";
} else {
_description += "string";
* an encoding specified.
*/
const auto char_array = lttng::make_unique<lst::static_length_array_type>(
- type.alignment, create_character_type(type.encoding), type.length);
+ type.alignment, create_character_type(type.encoding_), type.length);
visit(*char_array);
}
* an encoding specified.
*/
const auto char_sequence = lttng::make_unique<lst::dynamic_length_array_type>(
- type.alignment, create_character_type(type.encoding),
+ type.alignment, create_character_type(type.encoding_),
type.length_field_name);
visit(*char_sequence);
" event.header := {header_type};\n"
" packet.context := struct packet_context;\n",
fmt::arg("id", stream_class.id),
- fmt::arg("header_type", stream_class.header_type == lst::stream_class::header_type::COMPACT ?
+ fmt::arg("header_type", stream_class.header_type_ == lst::stream_class::header_type::COMPACT ?
"struct event_header_compact" :
"struct event_header_large"));
ret_code);
ret = lttng_ust_ctl_reply_register_channel(sock, chan_id,
- ust_reg_chan.header_type == lst::stream_class::header_type::COMPACT ?
+ ust_reg_chan.header_type_ == lst::stream_class::header_type::COMPACT ?
LTTNG_UST_CTL_CHANNEL_HEADER_COMPACT :
LTTNG_UST_CTL_CHANNEL_HEADER_LARGE,
ret_code);