16 #ifndef HAZELCAST_CLIENT_ADAPTOR_RAWPOINTERLIST_H_
17 #define HAZELCAST_CLIENT_ADAPTOR_RAWPOINTERLIST_H_
19 #include "hazelcast/client/IList.h"
20 #include "hazelcast/client/adaptor/MapEntryView.h"
21 #include "hazelcast/client/impl/DataArrayImpl.h"
22 #include "hazelcast/client/impl/EntryArrayImpl.h"
24 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
26 #pragma warning(disable: 4251) //for dll export
41 list.context->getSerializationService()) {
102 return std::auto_ptr<DataArray<T> >(
new hazelcast::client::impl::DataArrayImpl<T>(
103 list.toArrayData(), serializationService));
112 bool add(
const T &element) {
113 return list.
add(element);
122 bool remove(
const T &element) {
123 return list.
remove(element);
142 bool addAll(
const std::vector<T> &elements) {
143 return list.
addAll(elements);
157 bool addAll(
int index,
const std::vector<T> &elements) {
158 return list.
addAll(index, elements);
201 std::auto_ptr<T>
get(
int index) {
202 return serializationService.toObject<T>(list.getData(index).
get());
214 std::auto_ptr<T>
set(
int index,
const T &element) {
215 return serializationService.toObject<T>(
216 list.setData(index, serializationService.toData<T>(&element)).
get());
227 void add(
int index,
const T &element) {
228 list.
add(index, element);
238 std::auto_ptr<T>
remove(
int index) {
239 return serializationService.toObject<T>(list.removeData(index).
get());
268 std::auto_ptr<DataArray<T> >
subList(
int fromIndex,
int toIndex) {
269 return std::auto_ptr<DataArray<T> >(
new hazelcast::client::impl::DataArrayImpl<T>(
270 list.subListData(fromIndex, toIndex), serializationService));
275 serialization::pimpl::SerializationService &serializationService;
281 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
bool containsAll(const std::vector< T > &elements)
Definition: RawPointerList.h:132
std::string addItemListener(ItemListener< E > &listener, bool includeValue)
Warning 1: If listener should do a time consuming operation, off-load the operation to another thread...
Definition: IList.h:58
int size()
Definition: RawPointerList.h:75
int indexOf(const E &element)
Definition: IList.h:254
bool retainAll(const std::vector< T > &elements)
Removes the elements from this list that are not available in given "elements" vector.
Definition: RawPointerList.h:178
bool removeAll(const std::vector< T > &elements)
Definition: RawPointerList.h:167
int lastIndexOf(const T &element)
Definition: RawPointerList.h:259
int lastIndexOf(const E &element)
Definition: IList.h:264
bool retainAll(const std::vector< E > &elements)
Removes the elements from this list that are not available in given "elements" vector.
Definition: IList.h:184
void clear()
Removes all elements from list.
Definition: RawPointerList.h:185
int indexOf(const T &element)
Definition: RawPointerList.h:249
bool addAll(const std::vector< T > &elements)
Definition: RawPointerList.h:142
int size()
Definition: IList.h:82
boost::shared_ptr< E > get(int index)
You can check if element is available by.
Definition: IList.h:207
bool removeAll(const std::vector< E > &elements)
Definition: IList.h:173
std::auto_ptr< DataArray< T > > subList(int fromIndex, int toIndex)
Definition: RawPointerList.h:268
bool removeItemListener(const std::string ®istrationId)
Removes the specified item listener.
Definition: IList.h:74
bool containsAll(const std::vector< E > &elements)
Definition: IList.h:138
bool contains(const T &element)
Definition: RawPointerList.h:93
bool add(const E &element)
Definition: IList.h:118
Concurrent, distributed , client implementation of std::list.
Definition: RawPointerList.h:38
std::auto_ptr< T > set(int index, const T &element)
Replaced the element in the given index.
Definition: RawPointerList.h:214
void clear()
Removes all elements from list.
Definition: IList.h:191
bool isEmpty()
Definition: RawPointerList.h:83
std::auto_ptr< DataArray< T > > toArray()
Definition: RawPointerList.h:101
bool remove(const E &element)
Definition: IList.h:128
bool isEmpty()
Definition: IList.h:90
bool addAll(const std::vector< E > &elements)
Definition: IList.h:148
void add(int index, const T &element)
Adds the element to the given index.
Definition: RawPointerList.h:227
Item listener for IQueue, ISet and IList.
Definition: ItemListener.h:40
bool add(const T &element)
Definition: RawPointerList.h:112
bool removeItemListener(const std::string ®istrationId)
Removes the specified item listener.
Definition: RawPointerList.h:67
std::string addItemListener(ItemListener< T > &listener, bool includeValue)
Warning 1: If listener should do a time consuming operation, off-load the operation to another thread...
Definition: RawPointerList.h:55
bool addAll(int index, const std::vector< T > &elements)
Adds elements in vector to the list with given order.
Definition: RawPointerList.h:157
bool contains(const E &element)
Definition: IList.h:100