Impact Acquire SDK C++
|
A base class to locate components within the driver. More...
#include <mvIMPACT_acquire.h>
Public Member Functions | |
bool | bindComponent (Component &access, const std::string &name, int searchMode=0, int maxSearchDepth=INT_MAX) const |
Binds an access object to an internal driver object. | |
HLIST | bindSearchBase (HLIST baselist, const std::string &pathToSearchBase="") |
Assign a new search base to the locator. | |
unsigned int | changedCounter (void) const |
Returns the current changed counter for the component referenced by this object. | |
unsigned int | changedCounterAttr (void) const |
Returns the current attribute changed counter for the component referenced by this object. | |
ComponentLocatorBase () | |
Constructs a new unbound locator. | |
ComponentLocatorBase (const ComponentLocatorBase &src) | |
Constructs a new mvIMPACT::acquire::ComponentLocatorBase from an existing one. | |
ComponentLocatorBase (HLIST baselist) | |
Constructs a new bound to the specified base list locator. | |
ComponentLocatorBase (HLIST baselist, const std::string &pathToSearchBase) | |
Constructs a new locator and searches the search base list. | |
std::string | displayName (void) const |
Returns the display name of the component referenced by this object. | |
HOBJ | findComponent (const std::string &name, int searchMode=0, int maxSearchDepth=INT_MAX) const |
Tries to locate a certain component in a hierarchy of components. | |
HOBJ | hObj (void) const |
Returns a unique identifier for the component referenced by this object. | |
std::string | name (void) const |
Returns the name of the component referenced by this object. | |
operator HOBJ () const | |
Allows implicit conversion to a HOBJ. | |
ComponentLocatorBase & | operator= (const ComponentLocatorBase &rhs) |
Allows assignments of mvIMPACT::acquire::ComponentLocatorBase objects. | |
HLIST | searchbase_id (void) const |
Returns the unique identifier of the base list from where to start searching for a component. | |
Protected Types | |
enum | { BUFFER_INCREMENT_FACTOR = 6 } |
An internal constant that defines by which factor dynamic buffers will grow when the current size is not sufficient. More... | |
Protected Member Functions | |
std::string | compGetStringParam (TOBJ_StringQuery query, int param1=0, int param2=0) const |
A helper function to query certain component related string parameters. | |
Static Protected Member Functions | |
static char * | stringAllocator (const char *pBuf, size_t reqBufSize) |
An internal helper function for fast string allocation. | |
Protected Attributes | |
HOBJ | m_hObj |
A unique identifier for the internal driver object referenced by this instance of mvIMPACT::acquire::ComponentAccess. | |
A base class to locate components within the driver.
Every driver will offer a set of properties, methods and component lists. mvIMPACT::acquire::Property objects contain data such as the current gain in dB, the state of a digital input, etc.. mvIMPACT::acquire::Method objects can be executed like a normal function and mvIMPACT::acquire::ComponentList objects are used to group certain objects together to form a logical unit.
When it's necessary to locate one or more of these objects without knowing exactly where to look for them this locator class can be used to look for the component.
|
protectedinherited |
|
inlineexplicit |
Constructs a new unbound locator.
|
inlineexplicit |
Constructs a new bound to the specified base list locator.
[in] | baselist | A unique identifier to the base list from where to start to search for the search base. |
|
inlineexplicit |
Constructs a new locator and searches the search base list.
[in] | baselist | A unique identifier to the base list from where to start to search for the search base. |
[in] | pathToSearchBase | The name or path ('/' separated) to the search base. |
|
inline |
Constructs a new mvIMPACT::acquire::ComponentLocatorBase from an existing one.
[in] | src | A constant reference to the mvIMPACT::acquire::ComponentLocatorBase object, this object shall be created from |
|
inline |
Binds an access object to an internal driver object.
[in,out] | access | The access object to bind to the driver object. |
[in] | name | The path and/or name of the object to be located. |
[in] | searchMode | Specifies how and what to search for. Valid flags(these flags can be combined using the '|' operator) for this parameter are: - smIgnoreLists - smIgnoreMethods - smIgnoreProperties |
[in] | maxSearchDepth | The maximum depth (in lists) where to search for the component. By e.g. setting this value to 2, the current list and all its sub lists will be searched for the object, but no sublists of sub lists. -1 will search in ALL sub lists. |
Assign a new search base to the locator.
This new search base will be searched starting from the base list specified.
[in] | baselist | A unique identifier for the base list used to start searching the search base. |
[in] | pathToSearchBase | The name or path to the search base. |
|
inlineinherited |
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 mvIMPACT::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.
|
inlineinherited |
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.
|
inlineprotectedinherited |
A helper function to query certain component related string parameters.
This function might throw an exception, if an invalid parameter has been queried.
query | The type of the parameter to read | |
[in] | param1 | An additional parameter |
[in] | param2 | An additional parameter |
|
inlineinherited |
Returns the display name of the component referenced by this object.
|
inline |
Tries to locate a certain component in a hierarchy of components.
[in] | name | The path and/or name of the object to be located. |
[in] | searchMode | Specifies how and what to search for. Valid flags(these flags can be combined using the '|' operator) for this parameter are: - smIgnoreLists - smIgnoreMethods - smIgnoreProperties |
[in] | maxSearchDepth | The maximum depth (in lists) where to search for the component. By e.g. setting this value to 2, the current list and all its sub lists will be searched for the object, but no sublists of sub lists. -1 will search in ALL sub lists. |
|
inlineinherited |
Returns a unique identifier for the component referenced by this object.
|
inlineinherited |
Returns the name of the component referenced by this object.
|
inlineinherited |
Allows implicit conversion to a HOBJ.
|
inline |
Allows assignments of mvIMPACT::acquire::ComponentLocatorBase objects.
|
inline |
Returns the unique identifier of the base list from where to start searching for a component.
|
inlinestaticprotectedinherited |
An internal helper function for fast string allocation.
|
protectedinherited |
A unique identifier for the internal driver object referenced by this instance of mvIMPACT::acquire::ComponentAccess.