rwlogo
HydraExpress 4.6

HydraExpress C++ API Reference Guide


   


Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::ArrayHandle< T > Class Template Reference
[Web Services]

Implements multidimensional SOAP-encoded arrays. More...

#include <rwsf/webservice/ArrayHandle.h>

Inheritance diagram for rwsf::ArrayHandle< T >:
rwsf::XmlBindingHandle rwsf::XmlBindingHandleBase rwsf::HandleBase

List of all members.

Public Member Functions

 ArrayHandle (const ArrayHandle< T > &other)
void append (const_reference item)
void push_back (const_reference item)
const_reference operator() (size_type idx) const
reference operator() (size_type idx)
const_reference operator[] (size_type idx) const
reference operator[] (size_type idx)
reference at (size_type idx)
const_reference at (size_type idx) const
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
size_type entries () const
bool isEmpty () const
bool empty () const
void clear ()
bool contains (const_reference key) const
bool find (const_reference key, value_type &val) const
const_reference first () const
reference first ()
size_type index (const_reference key) const
size_type occurrencesOf (const_reference key) const
iterator insert (iterator it, const_reference key)
iterator insert (const_reference key)
void insertAt (size_type index, const_reference item)
void prepend (const_reference item)
bool remove (const_reference key)
size_type removeAll (const_reference key)
value_type removeAt (size_type index)
reference back ()
const_reference back () const
reference last ()
const_reference last () const
size_type length () const
size_type size () const
void resize (size_t n)
value_type removeFirst ()
value_type removeLast ()
size_type replaceAll (const_reference oldVal, const_reference newVal)
std::vector< size_t > & getDimensions ()
const std::vector< size_t > & getDimensions () const
void parseDimensions (const std::string &arrayType)

Detailed Description

template<class T>
class rwsf::ArrayHandle< T >

All generated SOAP-Encoded arrays are derived from rwsf::ArrayHandler<T> , instantiated on the type of element contained in the array.

Note that this class uses reference semantics in which an instance of this class represents a reference to an implementation class.

For more information on SOAP-Encoded arrays, see the appendix in Web Service Development Guide.


Constructor & Destructor Documentation

template<class T >
rwsf::ArrayHandle< T >::ArrayHandle ( const ArrayHandle< T > &  other  )  [inline]

Copy constructor. Constructs a new handle from handle other.


Member Function Documentation

template<class T >
void rwsf::ArrayHandle< T >::append ( const_reference  item  )  [inline]

Adds item to the end of the collection body.

template<class T >
const_reference rwsf::ArrayHandle< T >::at ( size_type  idx  )  const [inline]

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.

template<class T >
reference rwsf::ArrayHandle< T >::at ( size_type  idx  )  [inline]

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.

template<class T >
const_reference rwsf::ArrayHandle< T >::back (  )  const [inline]

Returns a reference to the last element.

template<class T >
reference rwsf::ArrayHandle< T >::back (  )  [inline]

Returns a reference to the last element.

template<class T >
const_iterator rwsf::ArrayHandle< T >::begin (  )  const [inline]

Returns an iterator positioned at the first element of the body.

template<class T >
iterator rwsf::ArrayHandle< T >::begin (  )  [inline]

Returns an iterator positioned at the first element of the body.

template<class T >
void rwsf::ArrayHandle< T >::clear (  )  [inline]

Clears the collection by removing all items from the body. Each item has its destructor called.

template<class T >
bool rwsf::ArrayHandle< T >::contains ( const_reference  key  )  const [inline]

Returns true if key exists in the collection, otherwise returns false.

template<class T >
bool rwsf::ArrayHandle< T >::empty (  )  const [inline]

Returns true if there are no items in the collection, false otherwise.

template<class T >
const_iterator rwsf::ArrayHandle< T >::end (  )  const [inline]

Returns a past-the-end valued iterator of the body.

template<class T >
iterator rwsf::ArrayHandle< T >::end (  )  [inline]

Returns a past-the-end valued iterator of the body.

template<class T >
size_type rwsf::ArrayHandle< T >::entries (  )  const [inline]

Returns the number of elements in the body.

template<class T >
bool rwsf::ArrayHandle< T >::find ( const_reference  key,
value_type &  val 
) const [inline]

Returns true if key exists in the collection, and assigns key to val. Otherwise, returns false and leaves the value of val unchanged.

template<class T >
reference rwsf::ArrayHandle< T >::first (  )  [inline]

Returns a reference to the first element of the body.

template<class T >
const_reference rwsf::ArrayHandle< T >::first (  )  const [inline]

Returns a reference to the first element of the body.

template<class T >
const std::vector<size_t>& rwsf::ArrayHandle< T >::getDimensions (  )  const [inline]

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[]).

template<class T >
std::vector<size_t>& rwsf::ArrayHandle< T >::getDimensions (  )  [inline]

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[]).

template<class T >
size_type rwsf::ArrayHandle< T >::index ( const_reference  key  )  const [inline]

Returns the position of the first item that matches key, or returns RWSF_NPOS if no such item exists.

template<class T >
iterator rwsf::ArrayHandle< T >::insert ( const_reference  key  )  [inline]

Adds the item key to the end of the collection.

template<class T >
iterator rwsf::ArrayHandle< T >::insert ( iterator  it,
const_reference  key 
) [inline]

Adds the new item key before the item at position it.

template<class T >
void rwsf::ArrayHandle< T >::insertAt ( size_type  index,
const_reference  item 
) [inline]

Inserts item in 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.

template<class T >
bool rwsf::ArrayHandle< T >::isEmpty (  )  const [inline]

Returns true if there are no items in the collection, false otherwise.

template<class T >
const_reference rwsf::ArrayHandle< T >::last (  )  const [inline]

Returns a reference to the last element.

template<class T >
reference rwsf::ArrayHandle< T >::last (  )  [inline]

Returns a reference to the last element.

template<class T >
size_type rwsf::ArrayHandle< T >::length (  )  const [inline]

Returns the number of elements in the body.

template<class T >
size_type rwsf::ArrayHandle< T >::occurrencesOf ( const_reference  key  )  const [inline]

Returns the number of times key occurs in the collection.

template<class T >
reference rwsf::ArrayHandle< T >::operator() ( size_type  idx  )  [inline]

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.

template<class T >
const_reference rwsf::ArrayHandle< T >::operator() ( size_type  idx  )  const [inline]

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.

template<class T >
reference rwsf::ArrayHandle< T >::operator[] ( size_type  idx  )  [inline]

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.

template<class T >
const_reference rwsf::ArrayHandle< T >::operator[] ( size_type  idx  )  const [inline]

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.

template<class T >
void rwsf::ArrayHandle< T >::parseDimensions ( const std::string &  arrayType  )  [inline]

Parses the dimension string in the XML SOAP Array definition and sets the array dimensions in "this".

template<class T >
void rwsf::ArrayHandle< T >::prepend ( const_reference  item  )  [inline]

Adds the item item to the beginning of the collection.

template<class T >
void rwsf::ArrayHandle< T >::push_back ( const_reference  item  )  [inline]

Adds item to the end of the collection body.

template<class T >
bool rwsf::ArrayHandle< T >::remove ( const_reference  key  )  [inline]

Removes the first occurrence of key in the array and returns true. If key is not found, returns false.

template<class T >
size_type rwsf::ArrayHandle< T >::removeAll ( const_reference  key  )  [inline]

Removes all occurrences of key in the collection and returns the number of items removed.

template<class T >
value_type rwsf::ArrayHandle< T >::removeAt ( size_type  index  )  [inline]

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.

template<class T >
value_type rwsf::ArrayHandle< T >::removeFirst (  )  [inline]

Removes and returns the first item in the collection.

template<class T >
value_type rwsf::ArrayHandle< T >::removeLast (  )  [inline]

Removes and returns the last item in the collection.

template<class T >
size_type rwsf::ArrayHandle< T >::replaceAll ( const_reference  oldVal,
const_reference  newVal 
) [inline]

Replaces all elements t in self with newVal such that the expression (t == oldVal) is true. Returns the number of items replaced.

template<class T >
void rwsf::ArrayHandle< T >::resize ( size_t  n  )  [inline]

Modifies the capacity of the vector to be at least as large as n. This function has no effect if the capacity is already as large as n.

template<class T >
size_type rwsf::ArrayHandle< T >::size (  )  const [inline]

Returns the number of elements in the body.


Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.