Safir SDK Core
Loading...
Searching...
No Matches
EntityIterator.h
Go to the documentation of this file.
1/******************************************************************************
2*
3* Copyright Saab AB, 2007-2013 (http://safirsdkcore.com)
4*
5* Created by: Anders Widén / stawi
6*
7*******************************************************************************
8*
9* This file is part of Safir SDK Core.
10*
11* Safir SDK Core is free software: you can redistribute it and/or modify
12* it under the terms of version 3 of the GNU General Public License as
13* published by the Free Software Foundation.
14*
15* Safir SDK Core is distributed in the hope that it will be useful,
16* but WITHOUT ANY WARRANTY; without even the implied warranty of
17* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18* GNU General Public License for more details.
19*
20* You should have received a copy of the GNU General Public License
21* along with Safir SDK Core. If not, see <http://www.gnu.org/licenses/>.
22*
23******************************************************************************/
24#pragma once
25
27#include <Safir/Dob/Internal/EntityIteratorImpl.h>
30#include <boost/iterator/iterator_facade.hpp>
31
32namespace Safir
33{
34namespace Dob
35{
40 public boost::iterator_facade
41 <
42 EntityIterator,
43 const EntityProxy,
44 boost::single_pass_traversal_tag
45 >,
46 private Internal::EntityIteratorImpl
47 {
48 public:
51 EntityIterator() = default;
52
54 EntityIterator(const EntityIterator & other) = default;
55
58 ~EntityIterator() = default;
59
61 EntityIterator & operator=(const EntityIterator& other) = default;
62
71 using boost::iterator_facade<EntityIterator,
72 const EntityProxy,
73 boost::single_pass_traversal_tag>::operator++;
74 private:
76 friend class ConnectionBase;
77
78 //Disable postincrement iterator
79 //Use preincrement, i.e. ++it, instead.
80 const EntityIterator operator++(int) = delete;
81
82 EntityIterator(const long ctrl,
83 const Typesystem::TypeId typeId,
84 const bool includeSubclasses)
85 : EntityIteratorImpl(ctrl,typeId,includeSubclasses)
86 {
87
88 }
89 };
90}
91}
This namespace contains all the functionality and definitions of the SAFIR SDK.
Definition Backdoor.h:31
DotsC_TypeId TypeId
A unique type identifier.
Definition Defs.h:218
Common base class for connections to the DOB.
Definition ConnectionBase.h:59
A STL conformant forward iterator used to traverse entity instances.
Definition EntityIterator.h:47
EntityIterator & operator=(const EntityIterator &other)=default
Copy assignment operator.
~EntityIterator()=default
Destructor.
EntityIterator(const EntityIterator &other)=default
Copy Constructor.
EntityIterator()=default
Constructs an "end" iterator.
friend class boost::iterator_core_access
Definition EntityIterator.h:75
Proxy class for an entity.
Definition EntityProxy.h:54