EntityIterator::EntityIterator(const long ctrl, const Typesystem::TypeId typeId, const bool includeSubclasses): m_ctrl(ctrl), m_iteratorId(-1) { bool success; bool end; DoseC_EntityIteratorCreate(m_ctrl, typeId, includeSubclasses, m_iteratorId, end, success); if (!success) { Typesystem::LibraryExceptions::Instance().Throw(); } if (end) { *this = EntityIterator(); } }
void EntityIterator::increment() { if (m_iteratorId == -1) { throw Typesystem::SoftwareViolationException(L"Cannot increment an 'end' iterator", __WFILE__,__LINE__); } m_dereferenced.reset(); bool success; bool end; DoseC_EntityIteratorIncrement(m_ctrl, m_iteratorId, end, success); if (!success) { Typesystem::LibraryExceptions::Instance().Throw(); } if (end) { *this = EntityIterator(); } }
HasProblems::EntityIterator HasProblems::endEntity() { // Note that we give call a constructor with type 4, in order to allow // a fast comparison. return EntityIterator(4); }
HasProblems::EntityIterator HasProblems::beginEntity() { return EntityIterator(); }
DECLARE_EXPORT HasProblems::EntityIterator HasProblems::beginEntity() { return EntityIterator(); }