VMware GemFire Native C++ Reference
9.2.4
Main Page
Related Pages
Namespaces
Namespace List
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
Typedefs
Enumerations
Enumerator
Files
File List
Globals
All
c
d
g
l
Enumerations
Enumerator
g
Macros
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
HashSetOfSharedBase.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#ifndef GEODE_HASHSETOFSHAREDBASE_H_
4
#define GEODE_HASHSETOFSHAREDBASE_H_
5
6
/*
7
* Licensed to the Apache Software Foundation (ASF) under one or more
8
* contributor license agreements. See the NOTICE file distributed with
9
* this work for additional information regarding copyright ownership.
10
* The ASF licenses this file to You under the Apache License, Version 2.0
11
* (the "License"); you may not use this file except in compliance with
12
* the License. You may obtain a copy of the License at
13
*
14
* http://www.apache.org/licenses/LICENSE-2.0
15
*
16
* Unless required by applicable law or agreed to in writing, software
17
* distributed under the License is distributed on an "AS IS" BASIS,
18
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
* See the License for the specific language governing permissions and
20
* limitations under the License.
21
*/
22
23
#include "geode_globals.hpp"
24
#include "
SharedPtr.hpp
"
25
#include "
HashFunction.hpp
"
26
#ifdef BUILD_CPPCACHE
27
#include <unordered_set>
28
#endif
29
33
namespace
apache
{
34
namespace
geode
{
35
namespace
client {
36
37
#ifdef BUILD_CPPCACHE
38
typedef
std::unordered_set<SharedBasePtr, HashSB, EqualToSB> HSofSBP;
39
typedef
HSofSBP::const_iterator HSofSBPIterator;
40
#else
41
class
HSofSBP;
42
class
HSofSBPIterator;
43
#endif
44
47
class
CPPCACHE_EXPORT
HashSetOfSharedBase
{
48
private
:
49
HSofSBP* m_stdHashSet;
50
51
// Never defined.
52
HashSetOfSharedBase
();
53
54
public
:
56
class
CPPCACHE_EXPORT
Iterator
{
57
private
:
58
const
HashSetOfSharedBase
& m_set;
59
HSofSBPIterator* m_iter;
60
61
Iterator
(
const
HSofSBPIterator& iter,
const
HashSetOfSharedBase
& set);
62
63
// Never defined.
64
Iterator
();
65
66
public
:
67
Iterator
(
const
Iterator
& other);
68
69
const
SharedBasePtr
operator*()
const
;
70
71
bool
isEnd()
const
;
72
73
Iterator
& operator++();
74
75
void
operator++(
int
);
76
77
bool
operator==(
const
Iterator
& other)
const
;
78
79
bool
operator!=(
const
Iterator
& other)
const
;
80
81
void
reset();
82
83
~
Iterator
();
84
85
friend
class
HashSetOfSharedBase
;
86
87
private
:
88
const
Iterator
& operator=(
const
Iterator
&);
89
};
90
92
int32_t size()
const
;
93
95
int32_t max_size()
const
;
96
98
bool
empty()
const
;
99
101
int32_t bucket_count()
const
;
102
104
void
resize(int32_t n);
105
107
void
swap(
HashSetOfSharedBase
& other);
108
110
bool
insert(
const
SharedBasePtr
& k);
111
113
int32_t erase(
const
SharedBasePtr
& k);
114
116
void
clear();
117
119
bool
contains(
const
SharedBasePtr
& k)
const
;
120
122
int32_t count(
const
SharedBasePtr
& k)
const
;
123
125
Iterator
begin()
const
;
126
128
Iterator
end()
const
;
129
131
HashSetOfSharedBase
& operator=(
const
HashSetOfSharedBase
& other);
132
136
HashSetOfSharedBase
(
const
Hasher h,
const
EqualTo k);
137
141
HashSetOfSharedBase
(int32_t n,
const
Hasher h,
const
EqualTo k);
142
144
HashSetOfSharedBase
(
const
HashSetOfSharedBase
& other);
145
147
~
HashSetOfSharedBase
();
148
};
149
}
// namespace client
150
}
// namespace geode
151
}
// namespace apache
152
153
#endif // GEODE_HASHSETOFSHAREDBASE_H_
apache
Each enum represents a predefined RegionAttributes in a {}.
Definition:
Assert.hpp:31
apache::geode::client::HashSetOfSharedBase::Iterator
Interface of an iterator for HashSetOfSharedBase.
Definition:
HashSetOfSharedBase.hpp:56
HashFunction.hpp
apache::geode::client::HashSetOfSharedBase
Represents a HashSet of SharedBase
Definition:
HashSetOfSharedBase.hpp:47
SharedPtr.hpp
geode
CPPCACHE_EXPORT
#define CPPCACHE_EXPORT
Defines a Geode CPPCACHE export.
Definition:
geode_base.hpp:58
apache::geode::client::SharedPtr
Defines a reference counted shared pointer.
Definition:
SharedPtr.hpp:52
Pivotal GemFire C++ Cache API Documentation