RTI Connext .Net APIs  Version 5.2.0
 All Classes Namespaces Functions Variables Enumerations Properties Groups Pages
RTI.Connext.Infrastructure.LoanedSamples< T > Class Template Reference

Provides access to a collection of middleware-loaned samples. More...

Inherits RTI.Connext.Infrastructure.AlreadyDisposedHelper< T >, ICollection< Sample< T >>, and IDisposable.

Inherited by RTI.Connext.Infrastructure.LoanedSamples< T >.SamplesEnumerator< U >, and RTI.Connext.Infrastructure.LoanedSamples< T >.SamplesEnumerator< U >.

Public Member Functions

IEnumerator< Sample< T > > GetEnumerator ()
 
void Add (Sample< T > item)
 
void Dispose ()
 Returns the loaned samples to the middleware.
 
void Clear ()
 
bool Contains (Sample< T > item)
 
void CopyTo (Sample< T >[] array, int arrayIndex)
 
bool Remove (Sample< T > item)
 

Properties

bool IsReadOnly [get]
 
int Count [get]
 Returns the number of samples.
 
Sample< T > this[int i] [get]
 

Detailed Description

Provides access to a collection of middleware-loaned samples.

The samples in this container are loaned from the middleware and must be returned at some point.

To return the loan, use Dispose , from System.IDisposable or enclose this object within a using block.

The contents of this container should not be modified and references to the samples it contains are only valid before the loan is returned.

This class implements ICollection<Sample<T>>. It can be traversed using a foreach block.

As a read-only collection, any operations that modify it are not supported and throw System.InvalidOperationException.

Template Parameters
TThe data type of the contained Samples
See Also
RTI::Connext::RequestReply::Requester<TReq,TRep>::TakeReplies(int)
RTI::Connext::RequestReply::Replier<TReq,TRep>::TakeRequests(int)
Taking loaned samples
Taking samples by copy
Type Constraints
T :class 
T :global 
T :DDS.ICopyable<T> 
T :new() 

Member Function Documentation

IEnumerator<Sample<T> > RTI.Connext.Infrastructure.LoanedSamples< T >.GetEnumerator ( )
inline

From ICollection<Sample<T>>

void RTI.Connext.Infrastructure.LoanedSamples< T >.Add ( Sample< T >  item)
inline
Exceptions
System.InvalidOperationExceptionalways
void RTI.Connext.Infrastructure.LoanedSamples< T >.Dispose ( )
inline

Returns the loaned samples to the middleware.

After calling this operation this object cannot be accessed again.

See Also
DDS::TypedDataReader::return_loan (for more information on how the middleware loans samples)
void RTI.Connext.Infrastructure.LoanedSamples< T >.Clear ( )
inline
Exceptions
System.InvalidOperationExceptionalways
bool RTI.Connext.Infrastructure.LoanedSamples< T >.Contains ( Sample< T >  item)
inline

From ICollection<Sample<T>>

void RTI.Connext.Infrastructure.LoanedSamples< T >.CopyTo ( Sample< T >[]  array,
int  arrayIndex 
)
inline

From ICollection<Sample<T>>

bool RTI.Connext.Infrastructure.LoanedSamples< T >.Remove ( Sample< T >  item)
inline
Exceptions
System.InvalidOperationExceptionalways

Property Documentation

bool RTI.Connext.Infrastructure.LoanedSamples< T >.IsReadOnly
get
Returns
true always
int RTI.Connext.Infrastructure.LoanedSamples< T >.Count
get

Returns the number of samples.

Sample<T> RTI.Connext.Infrastructure.LoanedSamples< T >.this[int i]
get

From ICollection<Sample<T>>


RTI Connext .Net APIs Version 5.2.0 Copyright © Sun Jun 21 2015 Real-Time Innovations, Inc