#include <wvar.h>
Inheritance diagram for Wt::WVar< VARTYPE, PARENT >:
Public Member Functions | |
WVar (VARTYPE value=0) | |
VARTYPE | readValue () const |
VARTYPE | get (VARTYPE) const |
usefull for overrides and variables connection | |
void | set (VARTYPE value) |
void | connect (WVarBase &var) |
connect as a proxy to another WVar | |
operator VARTYPE () const | |
operator const std::string () const | |
WVarBase & | operator+= (const VARTYPE &value) |
WVarBase & | operator-= (const VARTYPE &value) |
WVarBase & | operator++ () |
prefix operator | |
WVarBase & | operator++ (int) |
postfix operator | |
WVarBase & | operator-- () |
WVarBase & | operator-- (int) |
Public Attributes | |
Signal012M< bool, VARTYPE, VARTYPE, Blocker > | aboutToChange |
Signal012< void, VARTYPE, VARTYPE > | changed |
Signal01< void, VARTYPE > | read |
sigc::signal1< VARTYPE, VARTYPE, Overrider > | override |
Protected Types | |
typedef std::pair< bool, VARTYPE > | ValidValue |
Protected Member Functions | |
const VARTYPE & | getValue () const |
avoids emitting read signal | |
void | setValue (const VARTYPE &value) |
avoids emitting aboutToChange, changed signal | |
Friends | |
class | WrappedParent::Parent |
Classes | |
class | WrappedParent |
Definition at line 283 of file wvar.h.
typedef std::pair<bool, VARTYPE> Wt::WVarBase< VARTYPE >::ValidValue [protected, inherited] |
void Wt::WVarBase< VARTYPE >::connect | ( | WVarBase< VARTYPE > & | var | ) | [inline, inherited] |
connect as a proxy to another WVar
Definition at line 182 of file wvar.h.
Referenced by Wt::Frame::onLayoutChange().
00182 { 00183 // set the real variable to the proxy value 00184 var = getValue(); 00185 00186 changed.connect( 00187 sigc::slot1<void, VARTYPE>( 00188 sigc::mem_fun(var, &WVarBase::set 00189 ))); 00190 00191 override.connect(sigc::mem_fun(var, &WVarBase::get 00192 )); 00193 }
VARTYPE Wt::WVarBase< VARTYPE >::get | ( | VARTYPE | ) | const [inline, inherited] |
usefull for overrides and variables connection
Definition at line 172 of file wvar.h.
Referenced by Wt::WVarBase< ExpandData >::connect().
00172 { 00173 return readValue(); 00174 }
const VARTYPE& Wt::WVarBase< VARTYPE >::getValue | ( | ) | const [inline, protected, inherited] |
avoids emitting read signal
Definition at line 121 of file wvar.h.
Referenced by Wt::WVarBase< ExpandData >::connect().
00121 { 00122 return value_; 00123 }
Wt::WVarBase< VARTYPE >::operator const std::string | ( | ) | const [inline, inherited] |
Wt::WVarBase< VARTYPE >::operator VARTYPE | ( | ) | const [inline, inherited] |
Definition at line 195 of file wvar.h.
References Wt::WVarBase< VARTYPE >::readValue().
00195 { 00196 return readValue(); 00197 }
Here is the call graph for this function:
WVarBase& Wt::WVarBase< VARTYPE >::operator++ | ( | int | ) | [inline, inherited] |
WVarBase& Wt::WVarBase< VARTYPE >::operator++ | ( | ) | [inline, inherited] |
WVarBase& Wt::WVarBase< VARTYPE >::operator+= | ( | const VARTYPE & | value | ) | [inline, inherited] |
WVarBase& Wt::WVarBase< VARTYPE >::operator-- | ( | int | ) | [inline, inherited] |
WVarBase& Wt::WVarBase< VARTYPE >::operator-- | ( | ) | [inline, inherited] |
WVarBase& Wt::WVarBase< VARTYPE >::operator-= | ( | const VARTYPE & | value | ) | [inline, inherited] |
VARTYPE Wt::WVarBase< VARTYPE >::readValue | ( | ) | const [inline, inherited] |
Definition at line 161 of file wvar.h.
Referenced by Wt::WVarBase< ExpandData >::get(), Wt::WVarBase< ExpandData >::operator const std::string(), and Wt::WVarBase< VARTYPE >::operator VARTYPE().
00161 { 00162 read.emit(value_); 00163 const OverideValue v = override.emit(value_); 00164 return (v.isValid()) ? v.value() : value_; 00165 }
void Wt::WVarBase< VARTYPE >::set | ( | VARTYPE | value | ) | [inline, inherited] |
void Wt::WVarBase< VARTYPE >::setValue | ( | const VARTYPE & | value | ) | [inline, protected, inherited] |
avoids emitting aboutToChange, changed signal
Definition at line 126 of file wvar.h.
Referenced by Wt::WVarBase< ExpandData >::operator=().
00126 { 00127 value_ = value; 00128 }
friend class WrappedParent::Parent [friend] |
Signal012M<bool, VARTYPE, VARTYPE, Blocker> Wt::WVarBase< VARTYPE >::aboutToChange [inherited] |
Definition at line 156 of file wvar.h.
Referenced by Wt::Layout::init(), and Wt::WVarBase< ExpandData >::operator=().
Signal012<void, VARTYPE, VARTYPE> Wt::WVarBase< VARTYPE >::changed [inherited] |
Definition at line 157 of file wvar.h.
Referenced by Wt::WVarBase< ExpandData >::connect(), Wt::Frame::Frame(), Wt::PushButton::init(), Wt::Layout::init(), Wt::Label::init(), Wt::CascadeLayout::init(), Wt::WVarBase< ExpandData >::operator=(), and Wt::Widget::Widget().
sigc::signal1<VARTYPE, VARTYPE, Overrider> Wt::WVarBase< VARTYPE >::override [mutable, inherited] |
Definition at line 159 of file wvar.h.
Referenced by Wt::WVarBase< ExpandData >::connect(), Wt::Layout::init(), Wt::WVarBase< ExpandData >::readValue(), and Wt::Widget::Widget().
Signal01<void, VARTYPE> Wt::WVarBase< VARTYPE >::read [mutable, inherited] |
This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.