Impact Acquire SDK .NET
ComponentList Class Reference

A class to provide access to component lists. More...

Inheritance diagram for ComponentList:
[legend]

Public Member Functions

 ComponentList ()
 Constructs a new unbound mv.impact.acquire.ComponentList object.
 
 ComponentList (int hList)
 Constructs a new mv.impact.acquire.ComponentList object.
 
String flagsAsString ()
 Returns the flags associated with this component as a string.
 
String flagsAsString (String separator)
 Returns the flags associated with this component as a string.
 
IEnumerable< T > getEnumerable< T > ()
 Returns an enumerator of a certain type that iterates through the collection.
 
IEnumerator< int > GetEnumerator ()
 Returns an enumerator that iterates through the collection.
 
bool hasList (String name, out int hList)
 Checks whether a list with the specified name resides in the current list.
 
bool hasProperty (String name, out int hProp)
 Checks whether a property with the specified name resides in the current list.
 
String representationAsString ()
 Returns the recommended representation of the referenced component as a string.
 
Component restoreDefault ()
 Restores the default for the referenced component.
 
Component selectedFeature (int index)
 Retrieves a component that is selected by the current one.
 
Component selectingFeature (int index)
 Retrieves a component that is selecting the current one.
 
String visibilityAsString ()
 Returns the recommended visibility of the referenced component as a string.
 

Static Public Member Functions

static Component factory (int hObj)
 Creates a new Component from a valid handle.
 
static Component operator++ (Component ci)
 Moves to the next sibling of the current mv.impact.acquire.Component instance.
 
static String representationAsString (TComponentRepresentation representation)
 Returns the recommended representation converted to a string.
 
static String visibilityAsString (TComponentVisibility visibility)
 Returns the recommended visibility converted to a string.
 

Properties

uint changedCounter [get]
 Returns the current changed counter for the component referenced by this object.
 
uint changedCounterAttr [get]
 Returns the current attribute changed counter for the component referenced by this object.
 
IEnumerable< ComponentcomponentEnumerable [get]
 Returns an enumerator that iterates through the collection.
 
IEnumerable< ComponentListcomponentListEnumerable [get]
 Returns an enumerator that iterates through all the mv.impact.acquire.ComponentList elements in the collection.
 
String componentTree [get]
 Returns a string representation of the full component tree residing in the current list.
 
String contentDescriptor [get]
 Returns a string containing information about what's in this list.
 
String displayName [get]
 Returns the display name of the component referenced by this object.
 
String docString [get]
 Returns a string containing general information about the component referenced by this object.
 
Component firstChild [get]
 Moves to the first child of this component(moves down one level).
 
Component firstSibling [get]
 Moves to the first sibling(the first feature in the current list of features).
 
TComponentFlag flags [get]
 Returns the flags associated with this component.
 
int hObj [get]
 Returns a unique identifier for the component referenced by this object.
 
bool isDefault [get]
 Checks if this component is currently referencing the default for this component.
 
bool isList [get]
 Checks if this component is of type mv.impact.acquire.ComponentList.
 
bool isMeth [get]
 Checks if this component is of type mv.impact.acquire.Method.
 
bool isProp [get]
 Checks if this component is of type mv.impact.acquire.Property or a derived type.
 
bool isValid [get]
 Checks if the internal component referenced by this object is still valid.
 
bool isVisible [get]
 Checks if the component is currently shadowed due to a settings made elsewhere or not.
 
bool isWriteable [get]
 Checks if the caller has write/modify access to the component.
 
Component lastSibling [get]
 Moves to the last sibling(the last feature in the current list of features).
 
String name [get]
 Returns the name of the component referenced by this object.
 
Component nextSibling [get]
 Moves to the next sibling(the next feature in the current list of features).
 
Component parent [get]
 Moves to the parent of this component(moves up one level).
 
TComponentRepresentation representation [get]
 Returns the recommended representation for this component.
 
uint selectedFeatureCount [get]
 Returns the number of features selected by the current one.
 
ReadOnlyCollection< ComponentselectedFeatures [get]
 Retrieves the list of components that are selected by the current one.
 
uint selectingFeatureCount [get]
 Returns the number of features selecting the current one.
 
ReadOnlyCollection< ComponentselectingFeatures [get]
 Retrieves the list of components that are selecting the current one.
 
uint size [get]
 Returns The number of valid component entries in the referenced list.
 
TComponentType type [get]
 Returns the type of the component referenced by hObj.
 
String typeAsString [get]
 Returns the type of the referenced component as a string.
 
TComponentVisibility visibility [get]
 Returns the recommended visibility for this component.
 

Detailed Description

A class to provide access to component lists.

This class provides access to internal component lists of the driver.

Constructor & Destructor Documentation

◆ ComponentList() [1/2]

ComponentList ( int hList)
inline

Constructs a new mv.impact.acquire.ComponentList object.

Parameters
[in]hListA valid handle to a list object

◆ ComponentList() [2/2]

ComponentList ( )
inline

Constructs a new unbound mv.impact.acquire.ComponentList object.

Member Function Documentation

◆ factory()

static Component factory ( int hObj)
inlinestaticinherited

Creates a new Component from a valid handle.

Returns
a new mv.impact.acquire.Component instance that can be casted to a matching type. Call mv.impact.acquire.Component.type to find out the correct type to use.
Parameters
[in]hObjA valid handle to a component.

◆ flagsAsString() [1/2]

String flagsAsString ( )
inlineinherited

Returns the flags associated with this component as a string.

Returns
The flags associated with this component as a string.

◆ flagsAsString() [2/2]

String flagsAsString ( String separator)
inlineinherited

Returns the flags associated with this component as a string.

Returns
The flags associated with this component as a string.
Parameters
[in]separatorA user definable string to separate the individual flags. The default value is ' | ' resulting in the string to look e.g. like this: 'cfWriteAccess | cfReadAccess'

◆ getEnumerable< T >()

IEnumerable< T > getEnumerable< T > ( )
inline

Returns an enumerator of a certain type that iterates through the collection.

This interface will allow to e.g. write code like this:

ComponentList cl = new ComponentList(getHandleFromSomewhere());
foreach (Property c in cl.getEnumerable<Property>())
{
validateProperty(c);
}
A class to provide access to component lists.
Definition ComponentList.cs:14
A base class for properties.
Definition Property.cs:109

See the framework's documentation about the System.Collections.IEnumerable interface for more information.

Returns
An enumerator that iterates through the collection

◆ GetEnumerator()

IEnumerator< int > GetEnumerator ( )
inline

Returns an enumerator that iterates through the collection.

See the framework's documentation about the System.Collections.IEnumerable interface for more information.

Returns
An enumerator that iterates through the collection

◆ hasList()

bool hasList ( String name,
out int hList )
inline

Checks whether a list with the specified name resides in the current list.

This function does NOT recurse into sub-lists.

Returns
  • true if the specified list has been found
  • false otherwise.
Parameters
[in]nameThe name of the list to search for
[out]hListAn integer receiving a handle to the detected list upon a successful function call

◆ hasProperty()

bool hasProperty ( String name,
out int hProp )
inline

Checks whether a property with the specified name resides in the current list.

This function does NOT recurse into sub-lists.

Returns
  • true if the specified property has been found
  • false otherwise.
Parameters
[in]nameThe name of the property to search for
[out]hPropAn integer receiving a handle to the detected property upon a successful function call

◆ operator++()

static Component operator++ ( Component ci)
inlinestaticinherited

Moves to the next sibling of the current mv.impact.acquire.Component instance.

This does the same as calling mv.impact.acquire.Component.nextSibling.

Returns
A new mv.impact.acquire.Component instance pointing to the next sibling of the current one.
Parameters
[in]ciA valid component.

◆ representationAsString() [1/2]

String representationAsString ( )
inlineinherited

Returns the recommended representation of the referenced component as a string.

Since
2.14.0
Returns
The recommended representation of the referenced component as a string.

◆ representationAsString() [2/2]

static String representationAsString ( TComponentRepresentation representation)
inlinestaticinherited

Returns the recommended representation converted to a string.

Since
2.14.0
Returns
The recommended representation converted to a string.
Parameters
[in]representationThe representation to query the string representation for

◆ restoreDefault()

Component restoreDefault ( )
inlineinherited

Restores the default for the referenced component.

Calling this function will restore the default value for the component referenced by this object.

If this function is called for an object of type mv.impact.acquire.ComponentList every component in that list is restored to the default value.

Note
The caller must have the right to modify the component. Otherwise an exception will be thrown.
Returns
A const reference to the component.

◆ selectedFeature()

Component selectedFeature ( int index)
inlineinherited

Retrieves a component that is selected by the current one.

This function retrieves a component that is selected by the current one. This information is mainly useful for GUI applications that want to arrange features in a way that dependencies between features can easily been spotted.

When a component 'selects' other components, this indicates that selected components may change whenever the selecting component changes. An example for a selector might be a property defining the index within a LUT while the value of a particular LUT entry could be a selected feature. Assuming 2 properties LUTIndex and LUTValue then changing LUTIndex will invalidate and possibly change LUTValue.

To find out how many mv.impact.acquire.Component objects are selected by the current one call mv.impact.acquire.Component.selectedFeatureCount. This value minus 1 will also be the max. value for index.

See also
mv.impact.acquire.Component.selectedFeatureCount,
mv.impact.acquire.Component.selectedFeatures
Since
1.11.20
Returns
A mv.impact.acquire.Component that is selected by the current one.
Parameters
[in]indexThe index for the component to query.

◆ selectingFeature()

Component selectingFeature ( int index)
inlineinherited

Retrieves a component that is selecting the current one.

This function retrieves a component that is selecting the current one. This information is mainly useful for GUI applications that want to arrange features in a way that dependencies between features can easily been spotted.

When a component 'selects' other components, this indicates that selected components may change whenever the selecting component changes. An example for a selector might be a property defining the index within a LUT while the value of a particular LUT entry could be a selected feature. Assuming 2 properties LUTIndex and LUTValue then changing LUTIndex will invalidate and possibly change LUTValue.

To find out how many mv.impact.acquire.Component objects are selecting the current one call mv.impact.acquire.Component.selectingFeatureCount. This value minus 1 will also be the max. value for index.

See also
mv.impact.acquire.Component.selectingFeatureCount,
mv.impact.acquire.Component.selectingFeatures
Since
1.11.20
Returns
A mv.impact.acquire.Component that is selecting the current one.
Parameters
[in]indexThe index for the component to query.

◆ visibilityAsString() [1/2]

String visibilityAsString ( )
inlineinherited

Returns the recommended visibility of the referenced component as a string.

Returns
The recommended visibility of the referenced component as a string.

◆ visibilityAsString() [2/2]

static String visibilityAsString ( TComponentVisibility visibility)
inlinestaticinherited

Returns the recommended visibility converted to a string.

Returns
The recommended visibility converted to a string.
Parameters
[in]visibilityThe visibility to query the string representation for

Property Documentation

◆ changedCounter

uint changedCounter
getinherited

Returns the current changed counter for the component referenced by this object.

This changed counter is incremented internally each time the component is modified. To check if this component has been modified since the last time, this check has been performed, keep track of the last return value of this function and compare it with the new value. This can be helpful e.g. to keep a GUI up to date. The value returned by this function will always be larger than or equal to the value returned by mv.impact.acquire.ComponentAccess.changedCounterAttr (except in case of a wrap around) when called at the same time for the same object as it's always incremented when the component has been modified in any way while the latter one will only be incremented if the attributes (e.g. the flags) but NOT if e.g. the value(s) of a property has been modified.

Example

//-----------------------------------------------------------------------------
public struct ComponentRef
//-----------------------------------------------------------------------------
{
uint m_lastChangedCount;
public ComponentRef( mv.impact.acquire.Component* pc ) : m_pc(pc), m_lastChangedCount(0) {}
};
//-----------------------------------------------------------------------------
public void fn( ComponentRef cr )
//-----------------------------------------------------------------------------
{
if( cr.m_pc )
{
uint currentChangedCount = cr.m_pc.changedCounter;
if( currentChangedCount != cr.m_lastChangedCount ) )
{
// something has happened since the last check.
doWhatNeedsToBeDone();
// and remember the current changed counter
cr.m_lastChangedCount = currentChangedCount;
}
}
}
A base class to implement access to internal driver components.
Definition Component.cs:133
This namespace contains classes and functions belonging to the image acquisition module of this SDK.
Definition Enumerations.cs:2
Definition Enumerations.cs:2
Definition Enumerations.cs:2
Returns
The current changed counter of this object.

◆ changedCounterAttr

uint changedCounterAttr
getinherited

Returns the current attribute changed counter for the component referenced by this object.

This changed counter is incremented internally each time the components attributes have been modified. To check if this components attributes have been modified since the last time, this check has been performed, keep track of the last return value of this function and compare it with the new value. This can be helpful e.g. to keep a GUI up to date.

Note
Attributes changes are e.g. a modification to a property's translation dictionary, but NOT a property's value. Because of this the value returned by this function will always be less or equal than the value returned by the function mv.impact.acquire.ComponentAccess.changedCounter (except in case of a wrap around) when called at the same time for the same object.
See also
mv.impact.acquire.ComponentAccess.changedCounter
Returns
The current attributes changed counter of this object.

◆ componentEnumerable

IEnumerable<Component> componentEnumerable
get

Returns an enumerator that iterates through the collection.

This interface will allow to e.g. write code like this:

ComponentList cl = new ComponentList(getHandleFromSomewhere());
foreach (Component c in cl.componentEnumerable)
{
Console.WriteLine("{0}", c.name);
}
String name
Returns the name of the component referenced by this object.
Definition ComponentAccess.cs:167
IEnumerable< Component > componentEnumerable
Returns an enumerator that iterates through the collection.
Definition ComponentList.cs:284

See the framework's documentation about the System.Collections.IEnumerable interface for more information.

Returns
An enumerator that iterates through the collection

◆ componentListEnumerable

IEnumerable<ComponentList> componentListEnumerable
get

Returns an enumerator that iterates through all the mv.impact.acquire.ComponentList elements in the collection.

This interface will allow to e.g. write code like this:

ComponentList cl = new ComponentList(getHandleFromSomewhere());
{
Console.WriteLine("{0}", cl.name);
}
IEnumerable< ComponentList > componentListEnumerable
Returns an enumerator that iterates through all the mv.impact.acquire.ComponentList elements in the c...
Definition ComponentList.cs:308

See the framework's documentation about the System.Collections.IEnumerable interface for more information.

Returns
An enumerator that iterates through the collection

◆ componentTree

String componentTree
get

Returns a string representation of the full component tree residing in the current list.

◆ contentDescriptor

String contentDescriptor
get

Returns a string containing information about what's in this list.

This string might not be defined by every list but in any case this function will return a valid string. However this string might be empty.

◆ displayName

String displayName
getinherited

Returns the display name of the component referenced by this object.

Returns
The display name of the component referenced by this object. This might be an empty string if no display name has been specified.

◆ docString

String docString
getinherited

Returns a string containing general information about the component referenced by this object.

Returns
A string containing general information about the component referenced by this object.

◆ firstChild

Component firstChild
getinherited

Moves to the first child of this component(moves down one level).

Calling this function will only succeed, if the current mv.impact.acquire.Component references a list.

Returns
A new mv.impact.acquire.Component object
Examples
Properties.cs.

◆ firstSibling

Component firstSibling
getinherited

Moves to the first sibling(the first feature in the current list of features).

Returns
A new mv.impact.acquire.Component object

◆ flags

TComponentFlag flags
getinherited

Returns the flags associated with this component.

Returns
The flags associated with this component.

◆ hObj

int hObj
getinherited

Returns a unique identifier for the component referenced by this object.

Returns
A unique identifier for the component referenced by this object.
Examples
GenICamCallbackOnEvent.cs, and Properties.cs.

◆ isDefault

bool isDefault
getinherited

Checks if this component is currently referencing the default for this component.

This function will return true only for derived components that have not been modified.

Returns
  • true if the component is currently set to its default value
  • false otherwise.

◆ isList

bool isList
getinherited

Checks if this component is of type mv.impact.acquire.ComponentList.

Returns
  • true if the component references a list
  • false otherwise
Examples
Properties.cs.

◆ isMeth

bool isMeth
getinherited

Checks if this component is of type mv.impact.acquire.Method.

Returns
  • true if the component references a method
  • false otherwise

◆ isProp

bool isProp
getinherited

Checks if this component is of type mv.impact.acquire.Property or a derived type.

Returns
  • true if the component references a property
  • false otherwise
Examples
GenICamCallbackOnEvent.cs, and Properties.cs.

◆ isValid

bool isValid
getinherited

Checks if the internal component referenced by this object is still valid.

This function can be used to verify whether a referenced component is still valid or not. When e.g. referencing a driver property after mv.impact.acquire.Device.close has been called this function would return false. Calling any other function that tries to access the referenced component in that case would raise an exception.

Returns
  • true if this object currently references a valid component
  • false otherwise.
Examples
GenICamCommonSettingsUsage.cs, and Properties.cs.

◆ isVisible

bool isVisible
getinherited

Checks if the component is currently shadowed due to a settings made elsewhere or not.

Settings applied to certain components might affect the behaviour of others. For example an activated automatic gain control might shadow the value written to the gain property by the user as the gain is calculated internally. In order to check if modifying the actual component will affect the behaviour of the system this function may be used. When it returns true, the mv.impact.acquire.Component will have an impact on the system, if false is returned, the feature might be modified, but this will currently NOT influence the acquisition process or the overall behaviour of the device or driver.

This is what is called visibility. The user still might modify or read the current mv.impact.acquire.Component when it's not visible however the actual data will be used only if the Component is visible (mv.impact.acquire.TComponentFlag.cfInvisible must NOT be set).

The visibility of a mv.impact.acquire.Component object will change only if other mv.impact.acquire.Component objects are modified and NEVER when a program runs but does not change any mv.impact.acquire.Component.

◆ isWriteable

bool isWriteable
getinherited

Checks if the caller has write/modify access to the component.

Returns
  • true if the caller is allowed to call write/modify operation for this component.
  • false otherwise.
Examples
Properties.cs.

◆ lastSibling

Component lastSibling
getinherited

Moves to the last sibling(the last feature in the current list of features).

Since
1.10.64
Returns
A new mv.impact.acquire.Component object

◆ name

String name
getinherited

Returns the name of the component referenced by this object.

Returns
The name of the component referenced by this object.
Examples
Callback.cs, GenICamCallbackOnEvent.cs, and Properties.cs.

◆ nextSibling

Component nextSibling
getinherited

Moves to the next sibling(the next feature in the current list of features).

Returns
A new mv.impact.acquire.Component object

◆ parent

Component parent
getinherited

Moves to the parent of this component(moves up one level).

Returns
A new mv.impact.acquire.Component object

◆ representation

TComponentRepresentation representation
getinherited

Returns the recommended representation for this component.

The representation can be used e.g. e.g. to develop a GUI that creates convenient controls for certain features.

Valid values for this property are defined by the enumeration mv.impact.acquire.TComponentRepresentation.

Since
2.14.0
Returns
The recommended representation for this component.

◆ selectedFeatureCount

uint selectedFeatureCount
getinherited

Returns the number of features selected by the current one.

See also
mv.impact.acquire.Component.selectedFeatures,
mv.impact.acquire.Component.selectedFeature
Returns
The number of features selected by the current one.

◆ selectedFeatures

ReadOnlyCollection<Component> selectedFeatures
getinherited

Retrieves the list of components that are selected by the current one.

This function retrieves the list of components that are selected by the current one. This information is mainly useful for GUI applications that want to arrange features in a way that dependencies between features can easily been spotted.

When a component 'selects' other components, this indicates that selected components may change whenever the selecting component changes. An example for a selector might be a property defining the index within a LUT while the value of a particular LUT entry could be a selected feature. Assuming 2 properties LUTIndex and LUTValue then changing LUTIndex will invalidate and possibly change LUTValue.

See also
mv.impact.acquire.Component.selectedFeatureCount,
mv.impact.acquire.Component.selectedFeature
Since
1.11.20
Returns
A list of components that are selected by the current one.

◆ selectingFeatureCount

uint selectingFeatureCount
getinherited

Returns the number of features selecting the current one.

See also
mv.impact.acquire.Component.selectingFeatures,
mv.impact.acquire.Component.selectingFeature
Since
1.11.20
Returns
The number of features selecting the current one.

◆ selectingFeatures

ReadOnlyCollection<Component> selectingFeatures
getinherited

Retrieves the list of components that are selecting the current one.

This function retrieves the list of components that are selecting the current one. This information is mainly useful for GUI applications that want to arrange features in a way that dependencies between features can easily been spotted.

When a component 'selects' other components, this indicates that selected components may change whenever the selecting component changes. An example for a selector might be a property defining the index within a LUT while the value of a particular LUT entry could be a selected feature. Assuming 2 properties LUTIndex and LUTValue then changing LUTIndex will invalidate and possibly change LUTValue.

See also
mv.impact.acquire.Component.selectingFeatureCount,
mv.impact.acquire.Component.selectingFeature
Since
1.11.20
Returns
A list of components that are selecting the current one.

◆ size

uint size
get

Returns The number of valid component entries in the referenced list.

Returns
The number of valid component entries in the referenced list.

◆ type

TComponentType type
getinherited

Returns the type of the component referenced by hObj.

Returns
The type of the component referenced by hObj.

◆ typeAsString

String typeAsString
getinherited

Returns the type of the referenced component as a string.

Returns
The type of the referenced component as a string.

◆ visibility

TComponentVisibility visibility
getinherited

Returns the recommended visibility for this component.

The visibility can be used e.g. to develop a GUI that displays a crucial subset of features only.

Returns
The recommended visibility for this component.