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) |
|
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
-
T | The 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
Member Function Documentation
IEnumerator<Sample<T> > RTI.Connext.Infrastructure.LoanedSamples< T >.GetEnumerator |
( |
| ) |
|
|
inline |
void RTI.Connext.Infrastructure.LoanedSamples< T >.Add |
( |
Sample< T > |
item | ) |
|
|
inline |
- Exceptions
-
System.InvalidOperationException | always |
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.InvalidOperationException | always |
bool RTI.Connext.Infrastructure.LoanedSamples< T >.Contains |
( |
Sample< T > |
item | ) |
|
|
inline |
void RTI.Connext.Infrastructure.LoanedSamples< T >.CopyTo |
( |
Sample< T >[] |
array, |
|
|
int |
arrayIndex |
|
) |
| |
|
inline |
bool RTI.Connext.Infrastructure.LoanedSamples< T >.Remove |
( |
Sample< T > |
item | ) |
|
|
inline |
- Exceptions
-
System.InvalidOperationException | always |
Property Documentation
bool RTI.Connext.Infrastructure.LoanedSamples< T >.IsReadOnly |
|
get |
int RTI.Connext.Infrastructure.LoanedSamples< T >.Count |
|
get |
Returns the number of samples.
Sample<T> RTI.Connext.Infrastructure.LoanedSamples< T >.this[int i] |
|
get |