PMapIterator.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2018 Digital Barriers plc. All rights reserved.
3  * Contact: http://www.digitalbarriers.com/
4  *
5  * This file is part of the Papillon SDK.
6  *
7  * You can't use, modify or distribute any part of this file without
8  * the explicit written agreements of Digital Barriers.
9  */
10 
15 #pragma once
16 #include <PHash.h>
17 #include <PObject.h>
18 
19 PAPILLON_BEGIN_NAMESPACE
20 
22 template<typename K, typename V>
23 class PMap;
25 
31 template<typename K, typename V>
32 class PAPILLON_API_CORE PMapIterator : public PObject
33 {
34 public:
38  PMapIterator();
39 
43  PMapIterator(const PMapIterator<K, V>& other);
44 
49 
53  bool HasNext() const;
54 
58  void Next();
59 
63  const K& GetKey() const;
64 
68  const V& GetValue() const;
69 
75  PResult GetValue(PObject& value) const;
76 
77  friend class PMap<K, V>;
78 };
79 
80 
81 typedef papillon::PMapIterator<papillon::PString, papillon::PObject> PStringMapIterator;
82 
83 
84 PAPILLON_END_NAMESPACE
The PResult class represents the result returned by most of Papillon functions; this class is used to...
Definition: PResult.h:159
The PObject class is the root class of all Papillon classes; all PObject behaves like shared referenc...
Definition: PObject.h:27
Iterator on a PMap.
Definition: PMapIterator.h:32
functions to compute hash values for PString and PGuid to be able to use them as keys in std::unorder...
papillon::PMapIterator< papillon::PString, papillon::PObject > PStringMapIterator
Definition: PMapIterator.h:81
Generic (templated) associative container; NOT thread-safe.
Definition: PMap.h:47
Class PObject: the root class of all Papillon classes.
PObject & operator=(const PObject &obj)
Performs a shared copy of other to this object.
Definition: PObject.h:45