| 210 | } |
| 211 | |
| 212 | bool IddObject_Impl::hasNameField() const { |
| 213 | if (m_nameFieldCache) { |
| 214 | return m_nameFieldCache->first; |
| 215 | } |
| 216 | |
| 217 | unsigned index = 0; |
| 218 | if (hasHandleField()) { |
| 219 | index = 1; |
| 220 | } |
| 221 | bool result = ((m_fields.size() > index) && (m_fields[index].isNameField())); |
| 222 | m_nameFieldCache = std::pair<bool, unsigned>(result, index); |
| 223 | return result; |
| 224 | } |
| 225 | |
| 226 | boost::optional<unsigned> IddObject_Impl::nameFieldIndex() const { |
| 227 | if (hasNameField()) { |