Compare declared field names, kinds, and nested layouts.
- Parameters
-
| other | Layout to compare recursively. |
- Returns
- True when both layouts describe the same record structure.
Definition at line 71 of file Composite.cpp.
72{
73 if (
m_fields.size() != other.m_fields.size())
74 return false;
75
76 for (
size_t i = 0; i <
m_fields.size(); ++i) {
78 const auto& right = other.m_fields[i];
79
80 if (left.name != right.name || left.type != right.type
81 || left.size_bytes != right.size_bytes
82 || static_cast<bool>(left.nested_layout) != static_cast<bool>(right.nested_layout))
83 return false;
84
85 if (left.nested_layout && !left.nested_layout->same_structure(*right.nested_layout))
86 return false;
87 }
88 return true;
89}
std::vector< CompositeField > m_fields
References m_fields.
Referenced by MayaFlux::IO::XmlDocument::from_rows(), MayaFlux::IO::XmlWriter::open(), MayaFlux::IO::records_of(), and MayaFlux::IO::XmlWriter::write_rows().