rwsf::ArrayHandlerwsf::XmlBindingHandle
#include rwsf/webservice/ArrayHandle.h
All generated SOAP-Encoded arrays are derived from rwsf::ArrayHandle<T> instantiated on the type of element contained in the array.
rwsf::ArrayHandle implements the handle/body idiom in which rwsf::ArrayBody is the body. The handle passes all methods to the body, which contains an instance of rwsf::SoapArray, the class that contains all the actual container functionality and to which the array body passes all its methods.
For more information on SOAP-Encoded arrays, see Section A.5.1, "SOAP-Encoded Arrays," in the HydraExpress Web Service Development Guide.
Note
For information on the parent class rwsf::XmlBindingHandle, see its entry in the HydraExpress XML Binding Reference Guide.
Handle methods that just call the corresponding method on the body are described only in the body class. For instance, if the handle class includes a method invoke() that calls the body's corresponding method doInvoke(), that method is documented only in the body class.
ArrayHandle(ArrayBody< T > * body);
Constructs a new handle attached to the body body.
ArrayHandle(const ArrayHandle< T > & other);
Copy constructor. Constructs a new handle from handle other.
ArrayHandle(const rwsf::SoapArray< T > & body);
Constructs a new handle using the rwsf::SoapArray as the basis for the new body.
void append(const_reference item);
Adds item to the end of the collection body.
reference at(size_type idx);
Returns a reference to the idxth element of the body. Index idx must be between 0 and one less then the number of entries in self, otherwise the function throws an exception of type rwsf::OutOfBoundsException.
const_reference at(size_type idx) const;
Returns a reference to the idxth element of the body. Index idx must be between 0 and one less then the number of entries in self, otherwise the function throws an exception of type rwsf::OutOfBoundsException.
reference back();
Returns a reference to the last element.
const_reference back() const;
Returns a reference to the last element.
iterator begin();
Returns an iterator positioned at the first element of the body.
const_iterator begin() const;
Returns an iterator positioned at the first element of the body.
void clear();
Clears the collection by removing all items from the body. Each item will have its destructor called.
bool contains(const_reference key) const;
Returns true if there exists an element t in self such that the expression(t ==key) is true, otherwise returns false.
bool empty() const;
Returns true if the size is zero.
iterator end();
Returns a past-the-end valued iterator of the body.
const_iterator end() const;
Returns a past-the-end valued iterator of the body.
size_type entries() const;
Returns the number of elements in the body.
bool find(const_reference key, value_type & val) const;
If there exists an element t in self such that the expression (t ==key) is true, assigns t to val and returns true. Otherwise, returns false and leaves the value of val unchanged.
const_reference first() const;
Returns a reference to the first element of the body.
reference first();
Returns a reference to the first element of the body.
std::vector< size_t > & getDimensions();
Returns a vector containing the size of each dimension in the array. If the array is int[2,3,4], then the returned vector contains 2, 3 and 4 in that order. Any dimension without a size is set to 0. For example, a one-dimension array returns a vector with a single element whose value is the upper bound of the array or 0 if there is no upper bound (defined as int[]).
const std::vector< size_t > & getDimensions() const;
Returns a vector containing the size of each dimension in the array. If the array is int[2,3,4], then the returned vector contains 2, 3 and 4 in that order. Any dimension without a size is set to 0. For example, a one-dimension array returns a vector with a single element whose value is the upper bound of the array or 0 if there is no upper bound (defined as int[]).
size_type index(const_reference key) const;
Returns the position of the first item t in the body, such that (t ==key), or returns RWSF_NPOS if no such item exists.
iterator insert(iterator it, const_reference key);
Adds the item key before position it in the array. The return value points to the position it.
iterator insert(const_reference key);
Adds the item key to the end of the collection.
void insertAt(size_type index, const_reference item);
Inserts itemin front of the item at position index in self. This position must be between 0 and the number of entries in the collection, otherwise the function throws an exception of type rwsf::OutOfBoundsException.
bool isEmpty() const;
Returns true if there are no items in the collection, false otherwise.
reference last();
Returns a reference to the last item in the collection.
const_reference last() const;
Returns a reference to the last item in the collection.
size_type length() const;
Returns the number of elements in the body.
size_type occurrencesOf(const_reference key) const;
Returns the number of elements t in self such that the expression (t==key) is true.
void parseDimensions(const std::string & arrayType);
Parses the dimension string in the XML SOAP Array definition and sets the array dimensions in "this".
void prepend(const_reference item);
Adds the item a to the beginning of the collection.
void push_back(const_reference item);
Inserts a copy of item to the end of the body.
bool remove(const_reference key);
Removes the first element t in self such that the expression (t ==key) is true and returns true. Returns false if there is no such element.
size_type removeAll(const_reference key);
Removes all elements t in self such that the expression (t ==key) is true. Returns the number of items removed.
value_type removeAt(size_type index);
Removes and returns the item at position index in self. This position must be between 0 and one less then the number of entries in the collection, otherwise the function throws an exception of type rwsf::OutOfBoundsException.
value_type removeFirst();
Removes and returns the first item in the collection.
value_type removeLast();
Removes and returns the last item in the collection.
size_type replaceAll(const_reference oldVal, const_reference newVal);
Replaces all elements t in self such that the expression (t ==oldVal) is true with newVal. Returns the number of items replaced.
void resize(size_t n);
Modify the capacity of the vector to be at least as large as n. The function has no effect if the capacity is already as large as n.
size_type size() const;
Returns the number of elements in the body.
body_type & body();
Returns the array, a rwsf::ArrayBody.
const body_type & body() const;
Returns the array, a rwsf::ArrayBody.
const_reference operator()(size_type idx) const;
Returns a reference to the idxth element of the body. Index idx should be between 0 and one less then the number of entries, otherwise the results are undefined. No bounds checking is performed.
reference operator()(size_type idx);
Returns a reference to the idxth element of the body. Index idx should be between 0 and one less then the number of entries, otherwise the results are undefined. No bounds checking is performed.
const_reference operator[](size_type idx) const;
Returns a reference to the idxth element of the body. Index idx must be between 0 and one less then the number of entries in self, otherwise the function throws an exception of type rwsf::OutOfBoundsException.
reference operator[](size_type idx);
Returns a reference to the idxth element of the body. Index idx must be between 0 and one less then the number of entries in self, otherwise the function throws an exception of type rwsf::OutOfBoundsException.
© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.