gphoto2pp
A C++ Wrapper for libgphoto2
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
gphoto2pp::NonValueWidget Class Reference

#include <non_value_widget.hpp>

Inheritance diagram for gphoto2pp::NonValueWidget:
Collaboration diagram for gphoto2pp::NonValueWidget:

Public Member Functions

int countChildren () const
 Gets the number of children to this current widget.
template<typename T >
getChildByName (std::string const &name) const
 Gets the child widget that matches the name.
template<typename T >
getChildByLabel (std::string const &label) const
 Gets the child widget that matches the label.
template<typename T >
getChild (int index) const
 Gets the child widget at the specified index.
template<typename T >
getChildById (int id) const
 Gets the child widget that matches the unique id.
- Public Member Functions inherited from gphoto2pp::CameraWidgetWrapper
virtual ~CameraWidgetWrapper ()
 CameraWidgetWrapper (CameraWidgetWrapper &&other)
CameraWidgetWrapperoperator= (CameraWidgetWrapper &&other)
 CameraWidgetWrapper (CameraWidgetWrapper const &other)
CameraWidgetWrapperoperator= (CameraWidgetWrapper const &other)
gphoto2::_CameraWidget * getPtr () const
 Gets the raw resource RAII indicates we still should allow our users access to the RAW Resource and it is applicable.
std::string getName () const
 Gets the widget's name.
CameraWidgetTypeWrapper getType () const
 Gets the widget's type.
std::string getLabel () const
 Gets the widget's label.
std::string getInfo () const
 Gets the widget's info.
int getId () const
 Gets the widget's unique id.
CameraWidgetWrapper getRoot () const
 Gets the widget's Root. This is likely going to be the Window Widget (same widget from ICameraWrapper::getConfig()).
CameraWidgetWrapper getParent () const
 Gets the widget's parent. This is the immediate parent of the widget. If the current widget is a leaf node, then this is likely a Section Widget, but could also be a Window Widget.

Protected Member Functions

 NonValueWidget (gphoto2::_CameraWidget *cameraWidget)
gphoto2::_CameraWidget * getChildByNameWrapper (std::string const &name) const
 Gets the child widget by the name passed in and returns the widget type that the user expects.
gphoto2::_CameraWidget * getChildByLabelWrapper (std::string const &label) const
 Gets the child widget by the label passed in and returns the widget type that the user expects.
gphoto2::_CameraWidget * getChildWrapper (int index) const
 Gets the child widget at the specified index and returns the widget type that the user expects.
gphoto2::_CameraWidget * getChildByIdWrapper (int id) const
 Gets the child widget that matches the unique id.
- Protected Member Functions inherited from gphoto2pp::CameraWidgetWrapper
 CameraWidgetWrapper (gphoto2::_CameraWidget *cameraWidget)
void ref ()
 Adds a reference count to the internal gphoto2::CameraWidget struct.
void unref ()
 Subtracts a reference count to the internal gphoto2::CameraWidget struct.
gphoto2::_CameraWidget * getRootDefault () const
 Gets the unwrapped CameraWidget struct pointer of the root.
gphoto2::_CameraWidget * getParentDefault () const
 Gets the unwrapped CameraWidget struct pointer of the parent.

Additional Inherited Members

- Protected Attributes inherited from gphoto2pp::CameraWidgetWrapper
gphoto2::_CameraWidget * m_cameraWidget = nullptr

Detailed Description

A class representing gphoto2 widgets which are not leaf nodes (have children), which is a Window or Section widget

Constructor & Destructor Documentation

gphoto2pp::NonValueWidget::NonValueWidget ( gphoto2::_CameraWidget *  cameraWidget)
protected

Member Function Documentation

int gphoto2pp::NonValueWidget::countChildren ( ) const

Gets the number of children to this current widget.

Returns
the number of children
Note
Direct wrapper for gp_widget_count_children(...)
Exceptions
GPhoto2pp::exceptions::gphoto2_exception
template<typename T >
T gphoto2pp::NonValueWidget::getChild ( int  index) const
inline

Gets the child widget at the specified index.

Template Parameters
atype that inherits from CameraWidgetWrapper
Parameters
[in]indexof the child widget to get
Returns
the widget
Exceptions
GPhoto2pp::exceptions::gphoto2_exception
template<typename T >
T gphoto2pp::NonValueWidget::getChildById ( int  id) const
inline

Gets the child widget that matches the unique id.

Template Parameters
atype that inherits from CameraWidgetWrapper
Parameters
[in]idof the child widget to get
Returns
the widget
Exceptions
GPhoto2pp::exceptions::gphoto2_exception
gphoto2::_CameraWidget* gphoto2pp::NonValueWidget::getChildByIdWrapper ( int  id) const
protected

Gets the child widget that matches the unique id.

Template Parameters
atype that inherits from CameraWidgetWrapper
Parameters
[in]idof the child widget to get
Returns
the widget
Note
Direct wrapper for gp_widget_get_child_by_id(...)
Exceptions
GPhoto2pp::exceptions::gphoto2_exception
template<typename T >
T gphoto2pp::NonValueWidget::getChildByLabel ( std::string const &  label) const
inline

Gets the child widget that matches the label.

Template Parameters
Ttype that inherits from CameraWidgetWrapper
Parameters
[in]labelof the child widget to get
Returns
the widget
Exceptions
GPhoto2pp::exceptions::gphoto2_exception
gphoto2::_CameraWidget* gphoto2pp::NonValueWidget::getChildByLabelWrapper ( std::string const &  label) const
protected

Gets the child widget by the label passed in and returns the widget type that the user expects.

Template Parameters
atype that inherits from CameraWidgetWrapper
Parameters
[in]labelof the child widget to get
Returns
the widget
Note
Direct wrapper for gp_widget_get_child_by_label(...)
Exceptions
GPhoto2pp::exceptions::gphoto2_exception
template<typename T >
T gphoto2pp::NonValueWidget::getChildByName ( std::string const &  name) const
inline

Gets the child widget that matches the name.

Template Parameters
Ttype that inherits from CameraWidgetWrapper
Parameters
[in]nameof the child widget to get
Returns
the widget
Exceptions
GPhoto2pp::exceptions::gphoto2_exception
gphoto2::_CameraWidget* gphoto2pp::NonValueWidget::getChildByNameWrapper ( std::string const &  name) const
protected

Gets the child widget by the name passed in and returns the widget type that the user expects.

Template Parameters
atype that inherits from CameraWidgetWrapper
Parameters
[in]nameof the child widget to get
Returns
the widget
Note
Direct wrapper for gp_widget_get_child_by_name(...)
Exceptions
GPhoto2pp::exceptions::gphoto2_exception
gphoto2::_CameraWidget* gphoto2pp::NonValueWidget::getChildWrapper ( int  index) const
protected

Gets the child widget at the specified index and returns the widget type that the user expects.

Template Parameters
atype that inherits from CameraWidgetWrapper
Parameters
[in]indexof the child widget to get
Returns
the widget
Note
Direct wrapper for gp_widget_get_child(...)
Exceptions
GPhoto2pp::exceptions::IndexOutOfRange
GPhoto2pp::exceptions::gphoto2_exception

The documentation for this class was generated from the following files: