JniProxyIter< T > Class Template Reference

JniProxyIter is used to access a JniProxy by reference. More...

#include <JniProxy.h>

List of all members.

Public Member Functions

 JniProxyIter ()
void operator++ ()

Public Attributes

jobject jIter


Detailed Description

template<class T>
class JniProxyIter< T >

JniProxyIter is used to access a JniProxy by reference.

Instances are returned by generated accessor methods (for either non-primitive type attributes or association ends). When the declared cardinality is 0..1, the returned iter may be singular. When the declared cardinality is 1..1, the returned iter will never be singular.

When the returned iter references a collection (either a multi-valued attribute or an association end with cardinality 0..n), it behaves as a forward iterator via operator++. It becomes singular when the collection is exhausted.

Definition at line 189 of file JniProxy.h.


Constructor & Destructor Documentation

template<class T>
JniProxyIter< T >::JniProxyIter (  )  [inline, explicit]

Definition at line 194 of file JniProxy.h.

References JniProxyIter< T >::jIter.

00195         : boost::shared_ptr<T>(new T)
00196     {
00197         // by default, no iteration support
00198         jIter = NULL;
00199     }


Member Function Documentation

template<class T>
void JniProxyIter< T >::operator++ (  )  [inline]

Definition at line 201 of file JniProxy.h.

References JniUtil::getNextFromIter(), and JniProxyIter< T >::jIter.

00202     {
00203         assert(jIter);
00204         boost::shared_ptr<T>::get()->jObject =
00205             JniUtil::getNextFromIter(boost::shared_ptr<T>::get()->pEnv,jIter);
00206         if (!(boost::shared_ptr<T>::get()->jObject)) {
00207             // iteration exhausted, so become singular
00208             boost::shared_ptr<T>::reset();
00209         }
00210     }


Member Data Documentation

template<class T>
jobject JniProxyIter< T >::jIter

Definition at line 192 of file JniProxy.h.

Referenced by ProxyAggStreamDef::getAggInvocation(), ProxyTupleAccessor::getAttrAccessor(), ProxyTupleDescriptor::getAttrDescriptor(), ProxyTupleProjection::getAttrProjection(), ProxyLcsRowScanStreamDef::getClusterScan(), ProxyFlatFileTupleStreamDef::getColumn(), ProxyCorrelationJoinStreamDef::getCorrelations(), ProxyBarrierStreamDef::getDynamicParameter(), ProxyExecutionStreamDef::getDynamicParamUse(), ProxyLbmSplicerStreamDef::getIndexAccessor(), ProxyTableWriterDef::getIndexWriter(), ProxyExecutionStreamDef::getInputFlow(), ProxyNestedLoopJoinStreamDef::getLeftJoinKey(), ProxyExecutionStreamDef::getOutputFlow(), ProxyCmdOpenDatabase::getParams(), ProxyWindowDef::getPartition(), ProxyReshapeStreamDef::getReshapeParameter(), ProxyIndexSearchDef::getSearchKeyParameter(), ProxyCmdPrepareExecutionStreamGraph::getStreamDefs(), ProxyWindowStreamDef::getWindow(), JniProxyIter< T >::JniProxyIter(), and JniProxyIter< T >::operator++().


The documentation for this class was generated from the following file:
Generated on Mon Jun 22 04:00:33 2009 for Fennel by  doxygen 1.5.1