![]() |
Imaging Control 4 C++ Library 1.4.0
|
Enumeration properties represent a feature whose value is selected from a list of named entries. More...
Public Member Functions | |
| std::vector< PropEnumEntry > | entries (Error &err=Error::Default()) const |
| Returns the list of entries in this enumeration property. | |
| PropEnumEntry | selectedEntry (Error &err=Error::Default()) const |
| Returns the currently selected entry of this enumeration property. | |
| std::string | getValue (Error &err=Error::Default()) const |
| Returns the name of the currently selected entry of this enumeration property. | |
| PropEnumEntry | findEntry (const std::string &name, Error &err=Error::Default()) const |
| Finds the enumeration entry with a specified name. | |
| PropEnumEntry | findEntry (int64_t value, Error &err=Error::Default()) const |
| Finds the enumeration entry with a specified value. | |
| bool | setIntValue (int64_t entry_value, Error &err=Error::Default()) |
| Selects an enumeration entry by its value. | |
| int64_t | getIntValue (Error &err=Error::Default()) const |
| Reads the value of the currently selected entry of this enumeration property. | |
| bool | setValue (const std::string &entry_name, Error &err=Error::Default()) |
| Selects an enumeration entry by its name. | |
| bool | selectEntry (const PropEnumEntry &entry, Error &err=Error::Default()) |
| Selects a specified enumeration entry. | |
Public Member Functions inherited from Property | |
| Property ()=default | |
| Creates an invalid object. | |
| bool | is_valid () const noexcept |
| Checks whether this property is a valid object. | |
| bool | operator== (const Property &other) const noexcept |
| Checks whether a property object refers to the same property as another property object. | |
| bool | operator!= (const Property &other) const noexcept |
| Checks whether a property object refers to a different property as another property object. | |
| bool | operator< (const Property &other) const noexcept |
| Provides an ordering of property objects. | |
| PropType | type (Error &err=Error::Default()) const |
| Returns the type of the property. | |
| std::string | name (Error &err=Error::Default()) const |
| Returns the name of the property. | |
| bool | isAvailable (Error &err=Error::Default()) const |
| Checks whether a property is currently available. | |
| bool | isLocked (Error &err=Error::Default()) const |
| Checks whether a property is currently locked. | |
| bool | isLikelyLockedByStream (Error &err=Error::Default()) const |
| Tries to determine whether a property is locked because a data stream is active. | |
| bool | isReadOnly (Error &err=Error::Default()) const |
| Checks whether a property is read-only. | |
| PropVisibility | visibility (Error &err=Error::Default()) const |
| Returns a visibility hint for the property. | |
| std::string | displayName (Error &err=Error::Default()) const |
| Returns the display name of the property. | |
| std::string | tooltip (Error &err=Error::Default()) const |
| Returns a tooltip for the property. | |
| std::string | description (Error &err=Error::Default()) const |
| Returns a description for the property. | |
| PropCommand | asCommand (Error &err=Error::Default()) const |
| Converts this property into a PropCommand. | |
| PropInteger | asInteger (Error &err=Error::Default()) const |
| Converts this property into a PropInteger. | |
| PropBoolean | asBoolean (Error &err=Error::Default()) const |
| Converts this property into a PropBoolean. | |
| PropFloat | asFloat (Error &err=Error::Default()) const |
| Converts this property into a PropFloat. | |
| PropString | asString (Error &err=Error::Default()) const |
| Converts this property into a PropString. | |
| PropEnumeration | asEnumeration (Error &err=Error::Default()) const |
| Converts this property into a PropEnumeration. | |
| PropEnumEntry | asEnumEntry (Error &err=Error::Default()) const |
| Converts this property into a PropEnumEntry. | |
| PropRegister | asRegister (Error &err=Error::Default()) const |
| Converts this property into a PropRegister. | |
| PropCategory | asCategory (Error &=Error::Default()) const |
| Converts this property into a PropCategory. | |
| NotificationToken | eventAddNotification (NotificationHandler cb, Error &err=Error::Default()) |
| Registers a new property notification event handler. | |
| bool | eventRemoveNotification (NotificationToken token, Error &err=Error::Default()) |
| Unregisters a previously registered property notification event handler. | |
| bool | isSelector (Error &err=Error::Default()) const |
| Indicates whether this property's value changes the meaning and/or value of other properties. | |
| std::vector< Property > | selectedProperties (Error &err=Error::Default()) const |
| Returns the list of properties whose values' meaning depend on this property. | |
Additional Inherited Members | |
Public Types inherited from Property | |
| using | NotificationHandler = std::function< void(Property &prop)> |
| Function prototype for property notification event handlers. | |
| using | NotificationToken = void * |
| Represents a registered callback. | |
Enumeration properties represent a feature whose value is selected from a list of named entries.
Common examples for an enumeration properties are PixelFormat, TriggerMode or ExposureAuto.
The value of an enumeration property can be get or set by both a enumeration entry's name or value.
Enumeration entries are represented by PropEnumEntry objects; a call to PropEnumeration::entries() returns the list of possible entries for an enumeration.
PropEnumeration instances are created in two ways:
|
inline |
Returns the list of entries in this enumeration property.
| [out] | err | Reference to an error handler. See Error Handling for details. |
std::vector containing the enumeration entries.
|
inline |
Finds the enumeration entry with a specified name.
| [in] | name | The name of the requested enumeration entry |
| [out] | err | Reference to an error handler. See Error Handling for details. |
|
inline |
Finds the enumeration entry with a specified value.
| [in] | value | The value of the requested enumeration entry |
| [out] | err | Reference to an error handler. See Error Handling for details. |
|
inline |
Reads the value of the currently selected entry of this enumeration property.
| [out] | err | Reference to an error handler. See Error Handling for details. |
0, if an error occurred.
|
inline |
Returns the name of the currently selected entry of this enumeration property.
| [out] | err | Reference to an error handler. See Error Handling for details. |
|
inline |
Returns the currently selected entry of this enumeration property.
| [out] | err | Reference to an error handler. See Error Handling for details. |
|
inline |
Selects a specified enumeration entry.
| [in] | entry | The enumeration entry to to select |
| [out] | err | Reference to an error handler. See Error Handling for details. |
true on success, otherwise false.
|
inline |
Selects an enumeration entry by its value.
| [in] | entry_value | The value of the entry to select |
| [out] | err | Reference to an error handler. See Error Handling for details. |
true on success, otherwise false.
|
inline |
Selects an enumeration entry by its name.
| [in] | entry_name | The name of the entry to to select |
| [out] | err | Reference to an error handler. See Error Handling for details. |
true on success, otherwise false.