51Degrees Common C/C++  4.1

A shared functionality library that is used by 51Degrees products

Collection.hpp

1 /* *********************************************************************
2  * This Source Code Form is copyright of 51Degrees Mobile Experts Limited.
3  * Copyright 2019 51Degrees Mobile Experts Limited, 5 Charlotte Close,
4  * Caversham, Reading, Berkshire, United Kingdom RG4 7BY
5  *
6  * This Source Code Form is subject to the terms of the Mozilla Public
7  * License, v. 2.0.
8  *
9  * If a copy of the MPL was not distributed with this file, You can obtain
10  * one at http://mozilla.org/MPL/2.0/.
11  *
12  * This Source Code Form is "Incompatible With Secondary Licenses", as
13  * defined by the Mozilla Public License, v. 2.0.
14  * ******************************************************************** */
15 
16 #ifndef FIFTYONE_DEGREES_COLLECTION_HPP
17 #define FIFTYONE_DEGREES_COLLECTION_HPP
18 
19 #include "Exceptions.hpp"
20 #include "collection.h"
21 
22 using namespace std;
23 
24 namespace FiftyoneDegrees {
25  namespace Common {
72  template <class K, class V> class Collection {
73  public:
74 
83  virtual ~Collection<K, V>() {};
84 
97  virtual V* getByIndex(uint32_t index) = 0;
98 
104  virtual V* getByKey(K key) = 0;
105 
110  virtual uint32_t getSize() = 0;
111 
115  protected:
116 
121  };
122  }
123 }
124 
125 #endif
51Degrees base namespace.
Definition: Collection.hpp:24
A group of items accessible by index or key.
Definition: Collection.hpp:72