You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is a common task to somehow log the received samples.
For this std::ostream streaming operators are needed which are currently (v0.10.4) not generated from the .idl files.
Other Vendors do also generate streaming operators, for cyclone we have to manually create them currently.
So every datatype shall have a streaming operator.
Examples
// Stream all class members
std::ostream& operator<<(std::ostream& s, T_TextMarkupSupportedType const& rhs)
{
return s << "["
<< "A_boldSupported: " << (rhs.A_boldSupported())
<< ", A_italicSupported: " << (rhs.A_italicSupported())
<< ", A_strikethroughSupported: " << (rhs.A_strikethroughSupported())
<< ", A_highlightSupported: " << (rhs.A_highlightSupported())
<< ", A_boldAndItalicSupported: " << (rhs.A_boldAndItalicSupported())
<< ", A_specialCharactersSupported: " << (rhs.A_specialCharactersSupported())
<< "]";
}
// Stream enums
std::ostream& operator<<(std::ostream& s, T_HorizontalAlignmentType const& rhs)
{
switch (rhs)
{
case P_Display_Extension_PSM::T_HorizontalAlignmentType::L_HorizontalAlignment__Invalid:
s << "T_HorizontalAlignmentType::L_HorizontalAlignment__Invalid"; break;
case P_Display_Extension_PSM::T_HorizontalAlignmentType::L_HorizontalAlignment__Default:
s << "T_HorizontalAlignmentType::L_HorizontalAlignment__Default"; break;
case P_Display_Extension_PSM::T_HorizontalAlignmentType::L_HorizontalAlignment__Left:
s << "T_HorizontalAlignmentType::L_HorizontalAlignment__Left"; break;
case P_Display_Extension_PSM::T_HorizontalAlignmentType::L_HorizontalAlignment__Centre:
s << "T_HorizontalAlignmentType::L_HorizontalAlignment__Centre"; break;
case P_Display_Extension_PSM::T_HorizontalAlignmentType::L_HorizontalAlignment__Right:
s << "T_HorizontalAlignmentType::L_HorizontalAlignment__Right"; break;
default: break;
}
return s;
}
The text was updated successfully, but these errors were encountered:
I think it is a worthwhile thing to generate these, and it is quite straightforward, too. Unfortunately, I don't think I'll get around to it anytime soon, but perhaps someone else feels up to the challenge?
It is a common task to somehow log the received samples.
For this
std::ostream
streaming operators are needed which are currently (v0.10.4) not generated from the.idl
files.Other Vendors do also generate streaming operators, for cyclone we have to manually create them currently.
So every datatype shall have a streaming operator.
Examples
The text was updated successfully, but these errors were encountered: