CVB.Net 15.0
Composite Class Reference

Aggregates multiple CVB objects under a common Purpose. More...

Inherits INativeHandle, and IList< INativeHandle >.

Public Member Functions

 Composite (CompositePurpose purpose)
 Creates a new Composite with the given purpose . More...
 
void Dispose ()
 Disposes of this composite and its aggregated objects. More...
 
int IndexOf (INativeHandle item)
 Finds the given item and returns its index. More...
 
void Insert (int index, INativeHandle item)
 Inserts an item at the given index . More...
 
void RemoveAt (int index)
 Removes the item at the given index . More...
 
void Add (INativeHandle item)
 Adds the item to the end of this collection. More...
 
void Clear ()
 Removes all items from this collection.
 
bool Contains (INativeHandle item)
 Determines whether this collection. More...
 
void CopyTo (INativeHandle[] array, int arrayIndex)
 Copies the elements of this PlaneEnum to the given array , starting at arrayIndex . More...
 
bool Remove (INativeHandle item)
 Removes the first occurrence of item from this collection. More...
 
IEnumerator< INativeHandleGetEnumerator ()
 Get the enumerator to iterate over all CVB objects. More...
 

Static Public Member Functions

static Composite FromObject (INativeHandle obj)
 Create a composite object from another obj . More...
 
static Composite FromHandle (IntPtr handle, ShareObject doShare)
 Create a composite object from a handle . More...
 

Protected Member Functions

 Composite (IntPtr handle)
 Create a composite object from a handle . More...
 
virtual void Dispose (bool disposing)
 IDispose helper function. More...
 

Properties

IntPtr Handle [get]
 Native CVB buffer handle. More...
 
bool IsDisposed [get]
 Tests if the native handle has already been disposed.
 
CompositePurpose Purpose [get]
 Get the CompositePurpose of this object.
 
int Count [get]
 Get the number of elements in this collection.
 
INativeHandle this[int index] [get, set]
 Gets/sets the element at the given index . More...
 
- Properties inherited from INativeHandle
IntPtr Handle [get]
 The native handle of the object.
 
bool IsDisposed [get]
 Possibility to check whether the object has already been disposed of.
 

Events

NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method. More...
 
- Events inherited from INativeHandle
NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method.
More...
 

Detailed Description

Aggregates multiple CVB objects under a common Purpose.

Constructor & Destructor Documentation

◆ Composite() [1/2]

Creates a new Composite with the given purpose .

Parameters
purposePurpose of this composite.

◆ Composite() [2/2]

Composite ( IntPtr  handle)
protected

Create a composite object from a handle .

Parameters
handleNative IBuffer handle.

Member Function Documentation

◆ Add()

void Add ( INativeHandle  item)

Adds the item to the end of this collection.

Parameters
itemItem to append.

◆ Contains()

bool Contains ( INativeHandle  item)

Determines whether this collection.

Parameters
itemItem to find.
Returns
true if item is in this collection.

◆ CopyTo()

void CopyTo ( INativeHandle[]  array,
int  arrayIndex 
)

Copies the elements of this PlaneEnum to the given array , starting at arrayIndex .

Parameters
arrayArray to copy elements to.
arrayIndexStart index in array .

◆ Dispose() [1/2]

void Dispose ( )

Disposes of this composite and its aggregated objects.

Call this method to release the resources allocated by this buffer immediately. Remember that after calling Dispose, any subsequent access to references to this buffer will result in an ObjectDisposedException.

◆ Dispose() [2/2]

virtual void Dispose ( bool  disposing)
protectedvirtual

IDispose helper function.

Parameters
disposingtrue when called via IDisposable.Dispose, false when called by the finalizer.

◆ FromHandle()

static Composite FromHandle ( IntPtr  handle,
ShareObject  doShare 
)
static

Create a composite object from a handle .

Parameters
handleNative IBuffer handle.
doShareShareObject.Yes if handle should be shared.
Returns
Newly created wrapper object.

◆ FromObject()

static Composite FromObject ( INativeHandle  obj)
static

Create a composite object from another obj .

Parameters
objObject to interpret as composite.
Returns
Newly created wrapper object.

◆ GetEnumerator()

IEnumerator< INativeHandle > GetEnumerator ( )

Get the enumerator to iterate over all CVB objects.

Returns
Enumerator over all CVB objects.

◆ IndexOf()

int IndexOf ( INativeHandle  item)

Finds the given item and returns its index.

Parameters
itemItem to find.
Returns
Index of item; -1 if not found.

◆ Insert()

void Insert ( int  index,
INativeHandle  item 
)

Inserts an item at the given index .

If the index is set to Count, item will be appended.

Parameters
indexIndex where to insert the item .
itemCVB object to insert.

◆ Remove()

bool Remove ( INativeHandle  item)

Removes the first occurrence of item from this collection.

Parameters
itemCVB object to remove.
Returns
true if item was removed; false otherwise.

◆ RemoveAt()

void RemoveAt ( int  index)

Removes the item at the given index .

Parameters
indexIndex of item to remove.

Property Documentation

◆ Handle

IntPtr Handle
get

Native CVB buffer handle.

It is normally not necessary to work with this handle in CVB.Net. Note that using this handle in connection with the legacy CVB managed wrappers may actually be disruptive to your application.

Implements INativeHandle.

◆ this[int index]

INativeHandle this[int index]
getset

Gets/sets the element at the given index .

Parameters
indexElement index.
Returns
The element at the given index .

Event Documentation

◆ ObjectDisposing

NativeHandleEventDelegate ObjectDisposing

Raised when this object is about to be disposed via the IDisposable.Dispose method.

This event is raised right before this object is disposed. The dispose itself cannot be canceled.