MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / hasNameField

Method hasNameField

src/utilities/idd/IddObject.cpp:212–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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()) {

Callers 6

setStringMethod · 0.80
addObjectMethod · 0.80
setStringMethod · 0.80
pushStringMethod · 0.80
TEST_FFunction · 0.80

Calls 2

isNameFieldMethod · 0.80
sizeMethod · 0.45

Tested by 1

TEST_FFunction · 0.64