1 #ifndef OSMSCOUT_TYPEINFOSET_H 2 #define OSMSCOUT_TYPEINFOSET_H 42 std::vector<TypeInfoRef>::const_iterator iterCurrent;
43 std::vector<TypeInfoRef>::const_iterator iterEnd;
47 const std::vector<value_type>::const_iterator& iterEnd)
48 : iterCurrent(iterCurrent),
51 while (this->iterCurrent!=this->iterEnd &&
52 !*this->iterCurrent) {
57 TypeInfoSetConstIterator(
const TypeInfoSetConstIterator& other) =
default;
63 while (iterCurrent!=iterEnd &&
73 TypeInfoSetConstIterator tmp(*
this);
80 bool operator==(
const TypeInfoSetConstIterator& other)
const 82 return iterCurrent==other.iterCurrent;
85 bool operator!=(
const TypeInfoSetConstIterator& other)
const 87 return iterCurrent!=other.iterCurrent;
112 std::vector<TypeInfoRef> types;
116 TypeInfoSet() =
default;
117 ~TypeInfoSet() =
default;
119 explicit TypeInfoSet(
const TypeConfig& typeConfig);
120 explicit TypeInfoSet(
const std::vector<TypeInfoRef>& types);
122 TypeInfoSet(
const TypeInfoSet& other) =
default;
123 TypeInfoSet(TypeInfoSet&& other) noexcept;
125 void Adapt(
const TypeConfig& typeConfig);
137 void Set(
const std::vector<TypeInfoRef>& types);
138 void Set(
const TypeInfoSet& other);
140 void Add(
const TypeInfoSet& types);
143 void Remove(
const TypeInfoSet& otherTypes);
145 void Intersection(
const TypeInfoSet& otherTypes);
151 return type->GetIndex()<types.size() &&
152 types[type->GetIndex()];
165 bool Intersects(
const TypeInfoSet& otherTypes)
const;
170 this->types=other.types;
171 this->count=other.count;
177 bool operator==(
const TypeInfoSet& other)
const;
178 bool operator!=(
const TypeInfoSet& other)
const;
180 inline TypeInfoSetConstIterator
begin()
const 182 return TypeInfoSetConstIterator(types.begin(),
186 inline TypeInfoSetConstIterator
end()
const 188 return TypeInfoSetConstIterator(types.end(),
TypeInfoRef pointer
Definition: TypeInfoSet.h:38
TypeInfoSet & operator=(const TypeInfoSet &other)
Definition: TypeInfoSet.h:167
const TypeInfoRef & operator*() const
Definition: TypeInfoSet.h:90
TypeInfoSetConstIterator end() const
Definition: TypeInfoSet.h:186
TypeInfoSetConstIterator(const std::vector< value_type >::const_iterator &iterCurrent, const std::vector< value_type >::const_iterator &iterEnd)
Definition: TypeInfoSet.h:46
TypeInfoRef operator->() const
Definition: TypeInfoSet.h:95
bool operator!=(const MapViewStruct &r1, const MapViewStruct &r2)
Definition: DBThread.h:61
bool IsSet(const TypeInfoRef &type) const
Definition: TypeInfoSet.h:147
bool operator==(const TypeInfoSetConstIterator &other) const
Definition: TypeInfoSet.h:80
TypeInfoRef value_type
Definition: TypeInfoSet.h:36
const TypeInfoRef & reference
Definition: TypeInfoSet.h:37
#define CLASS_FINAL
Definition: Compiler.h:26
#define OSMSCOUT_API
Definition: CoreImportExport.h:45
TypeInfoSetConstIterator begin() const
Definition: TypeInfoSet.h:180
TypeInfoSetConstIterator & operator++()
Definition: TypeInfoSet.h:59
void Clear()
Definition: TypeInfoSet.h:127
TypeInfoSetConstIterator operator++(int)
Definition: TypeInfoSet.h:71
bool operator==(const MapView &a, const MapView &b)
Definition: InputHandler.h:222
Definition: DBThread.h:86
TypeInfoSetConstIterator self_type
Definition: TypeInfoSet.h:35
std::shared_ptr< TypeInfo > TypeInfoRef
Definition: TypeConfig.h:58
bool Empty() const
Definition: TypeInfoSet.h:155
size_t Size() const
Definition: TypeInfoSet.h:160
bool operator!=(const TypeInfoSetConstIterator &other) const
Definition: TypeInfoSet.h:85
std::input_iterator_tag iterator_category
Definition: TypeInfoSet.h:39