gphoto2pp
A C++ Wrapper for libgphoto2
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
gphoto2pp::ValueWidgetBase< T > Class Template Reference

#include <value_widget_base.hpp>

Inheritance diagram for gphoto2pp::ValueWidgetBase< T >:
Collaboration diagram for gphoto2pp::ValueWidgetBase< T >:

Public Member Functions

virtual T getValue () const =0
 Gets the widget's value in terms of T.
virtual void setValue (T const &value)=0
 Sets the widget's value in terms of T.
- 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

 ValueWidgetBase (gphoto2::_CameraWidget *cameraWidget)
- 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

template<typename T>
class gphoto2pp::ValueWidgetBase< T >

A templated class which must be inherited by any leaf widget type. That means any widget type that is not a Section or a Widget. That way their specific widget implementations can define meaningful Get and Set methods.

Template Parameters
themeaningful value type for the widget

Constructor & Destructor Documentation

template<typename T>
gphoto2pp::ValueWidgetBase< T >::ValueWidgetBase ( gphoto2::_CameraWidget *  cameraWidget)
inlineprotected

Member Function Documentation

template<typename T>
virtual T gphoto2pp::ValueWidgetBase< T >::getValue ( ) const
pure virtual

Gets the widget's value in terms of T.

Returns
the widget's value

Implemented in gphoto2pp::DateWidget, gphoto2pp::StringWidget, gphoto2pp::FloatWidget, and gphoto2pp::IntWidget.

template<typename T>
virtual void gphoto2pp::ValueWidgetBase< T >::setValue ( T const &  value)
pure virtual

Sets the widget's value in terms of T.

Parameters
[in]valueto set for the widget
Returns
the widget's T value

Implemented in gphoto2pp::DateWidget, gphoto2pp::StringWidget, gphoto2pp::FloatWidget, and gphoto2pp::IntWidget.


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