Exemplo n.º 1
0
std::vector<unsigned> IdfExtensibleGroup::mf_indices() const {
  UnsignedVector result;
  if (!empty()) {
    for (unsigned i = 0, n = numFields(); i < n; ++i) {
      result.push_back(mf_toIndex(i));
    }
  }
  return result;
}
Exemplo n.º 2
0
UnsignedVector IdfExtensibleGroup::mf_subsetAndToFieldIndices(UnsignedVector indices) const {
  UnsignedVector result;
  OS_ASSERT(!empty());
  // downselect and convert to only this ExtensibleGroup
  for (unsigned index : indices) {
    if (index >= m_index) {
      unsigned fieldIndex = index - m_index;
      if (isValid(fieldIndex)) { result.push_back(fieldIndex); }
    }
  }
  return result;
}
Exemplo n.º 3
0
std::vector<unsigned> IdfExtensibleGroup::requiredFields() const {
  UnsignedVector result;
  if (!empty()) {
    IddFieldVector iddExtFields = m_impl->iddObject().extensibleGroup();
    for (unsigned fieldIndex = 0, n = numFields(); fieldIndex < n; ++fieldIndex) {
      if (iddExtFields[fieldIndex].properties().required) {
        result.push_back(fieldIndex);
      }
    }
  }
  return result;
}