00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef COH_SUB_SET_HPP
00017 #define COH_SUB_SET_HPP
00018
00019 #include "coherence/lang.ns"
00020
00021 #include "coherence/util/AbstractSet.hpp"
00022 #include "coherence/util/Set.hpp"
00023
00024 COH_OPEN_NAMESPACE2(coherence,util)
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 class COH_EXPORT SubSet
00035 : public class_spec<SubSet,
00036 extends<AbstractSet> >
00037 {
00038 friend class factory<SubSet>;
00039
00040
00041
00042 public:
00043
00044
00045
00046 SubSet(Set::Holder hSet);
00047
00048
00049
00050 public:
00051
00052
00053
00054
00055
00056
00057 virtual Set::View getOriginal() const;
00058
00059
00060
00061
00062
00063
00064 virtual bool isModified() const;
00065
00066
00067
00068
00069
00070
00071
00072
00073 virtual bool isTrackingRetained() const;
00074
00075
00076
00077
00078
00079
00080
00081 virtual Set::View getRetained() const;
00082
00083
00084
00085
00086
00087
00088
00089
00090 virtual bool isTrackingRemoved() const;
00091
00092
00093
00094
00095
00096
00097 virtual Set::View getRemoved() const;
00098
00099
00100
00101
00102
00103
00104 virtual Set::Handle ensureRetained();
00105
00106
00107
00108
00109
00110
00111 virtual Set::Handle ensureRemoved();
00112
00113
00114
00115
00116 virtual void resolve();
00117
00118
00119
00120
00121 virtual void reset();
00122
00123
00124
00125
00126 public:
00127
00128
00129
00130 virtual size32_t size() const;
00131
00132
00133
00134
00135 virtual bool isEmpty() const;
00136
00137
00138
00139
00140 virtual bool contains(Object::View v) const;
00141
00142
00143
00144
00145 virtual bool containsAll(Collection::View vCol) const;
00146
00147
00148
00149
00150 virtual Iterator::Handle iterator() const;
00151
00152
00153
00154
00155 virtual Muterator::Handle iterator();
00156
00157
00158
00159
00160 virtual ObjectArray::Handle toArray(
00161 ObjectArray::Handle hao = NULL) const;
00162
00163
00164
00165
00166 virtual bool add(Object::Holder oh);
00167
00168
00169
00170
00171 virtual bool addAll(Collection::View vCol);
00172
00173
00174
00175
00176 virtual bool remove(Object::View v);
00177
00178
00179
00180
00181 virtual bool removeAll(Collection::View vCol);
00182
00183
00184
00185
00186 virtual bool retainAll(Collection::View vCol);
00187
00188
00189
00190
00191 virtual void clear();
00192
00193
00194
00195
00196 protected:
00197
00198
00199
00200 FinalHolder<Set> m_ohSetOrig;
00201
00202
00203
00204
00205 MemberHandle<Set> m_hSetMod;
00206
00207
00208
00209
00210 bool m_fRetained;
00211 };
00212
00213 COH_CLOSE_NAMESPACE2
00214
00215 #endif // COH_SUB_SET_HPP
Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.