libqi-api  2.4.3.28
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
qi::PropertyImpl< T > Class Template Reference

#include <property.hpp>

Public Types

typedef boost::function< bool(T
&, const T &)> 
Setter
 
typedef boost::function< T(const
T &)> 
Getter
 
typedef SignalF< void(const T &)> SignalType
 
typedef T PropertyType
 
- Public Types inherited from qi::SignalF< void(const T &)>
typedef void(const T &) FunctionType
 
- Public Types inherited from qi::SignalBase
typedef boost::function< void(bool)> OnSubscribers
 

Public Member Functions

 PropertyImpl (Getter getter=Getter(), Setter setter=Setter(), SignalBase::OnSubscribers onsubscribe=SignalBase::OnSubscribers())
 
virtual ~PropertyImpl ()
 
T get () const
 
void set (const T &v)
 
void operator= (const T &v)
 
- Public Member Functions inherited from qi::SignalF< void(const T &)>
 SignalF (OnSubscribers onSubscribers=OnSubscribers())
 
virtual qi::Signature signature () const
 
SignalSubscriber & connect (...)
 
- Public Member Functions inherited from qi::SignalBase
 SignalBase (const Signature &signature, OnSubscribers onSubscribers=OnSubscribers())
 
 SignalBase (OnSubscribers onSubscribers=OnSubscribers())
 
virtual ~SignalBase ()
 
template<typename F >
SignalSubscriber & connect (const boost::function< F > &func)
 
SignalSubscriber & connect (const SignalSubscriber &s)
 
SignalSubscriber & connect (AnyObject object, const unsigned int slot)
 
SignalSubscriber & connect (AnyObject object, const std::string &slot)
 
bool disconnectAll ()
 
bool asyncDisconnectAll ()
 
bool disconnect (const SignalLink &link)
 
bool asyncDisconnect (const SignalLink &link)
 
virtual void trigger (const GenericFunctionParameters &params, MetaCallType callType=MetaCallType_Auto)
 
void setCallType (MetaCallType callType)
 Set the MetaCallType used by operator()(). More...
 
void operator() (qi::AutoAnyReference p1=qi::AutoAnyReference(), qi::AutoAnyReference p2=qi::AutoAnyReference(), qi::AutoAnyReference p3=qi::AutoAnyReference(), qi::AutoAnyReference p4=qi::AutoAnyReference(), qi::AutoAnyReference p5=qi::AutoAnyReference(), qi::AutoAnyReference p6=qi::AutoAnyReference(), qi::AutoAnyReference p7=qi::AutoAnyReference(), qi::AutoAnyReference p8=qi::AutoAnyReference())
 Trigger the signal with given arguments, and call type set by setCallType() More...
 
std::vector< SignalSubscriber > subscribers ()
 
bool hasSubscribers ()
 
void _setSignature (const Signature &s)
 
- Public Member Functions inherited from qi::PropertyBase
virtual ~PropertyBase ()
 
virtual SignalBase * signal ()=0
 
virtual void setValue (AutoAnyReference value)=0
 
virtual AnyValue value () const =0
 

Protected Attributes

Getter _getter
 
Setter _setter
 
T _value
 

Additional Inherited Members

- Public Attributes inherited from qi::SignalBase
boost::shared_ptr
< SignalBasePrivate > 
_p
 
- Static Public Attributes inherited from qi::SignalBase
static const SignalLink invalidSignalLink
 
- Protected Types inherited from qi::SignalBase
typedef boost::function< void(const
GenericFunctionParameters
&params, MetaCallType callType)> 
Trigger
 
- Protected Member Functions inherited from qi::SignalBase
void callSubscribers (const GenericFunctionParameters &params, MetaCallType callType=MetaCallType_Auto)
 
void setTriggerOverride (Trigger trigger)
 
void setOnSubscribers (OnSubscribers onSubscribers)
 
void callOnSubscribe (bool v)
 
void createNewTrackLink (int &id, SignalLink *&trackLink)
 
void disconnectTrackLink (int id)
 

Detailed Description

template<typename T>
class qi::PropertyImpl< T >

Definition at line 36 of file property.hpp.

Member Typedef Documentation

template<typename T>
typedef boost::function<T(const T&)> qi::PropertyImpl< T >::Getter

Definition at line 43 of file property.hpp.

template<typename T>
typedef T qi::PropertyImpl< T >::PropertyType

Definition at line 45 of file property.hpp.

template<typename T>
typedef boost::function<bool (T&, const T&)> qi::PropertyImpl< T >::Setter

Setter called with storage containing old value, and new value Returns true to invoke subscribers, false to 'abort' the update.

Definition at line 42 of file property.hpp.

template<typename T>
typedef SignalF<void(const T&)> qi::PropertyImpl< T >::SignalType

Definition at line 44 of file property.hpp.

Constructor & Destructor Documentation

template<typename T >
qi::PropertyImpl< T >::PropertyImpl ( Getter  getter = Getter(),
Setter  setter = Setter(),
SignalBase::OnSubscribers  onsubscribe = SignalBase::OnSubscribers() 
)
Parameters
gettervalue getter, default to reading _value
settervalue setter, what it returns will be written to _value. If it returns false, update operation will be silently aborted (subscribers will not be called)
onsubscribecallback to call when subscribers connect or disconnect from the property

Definition at line 26 of file property.hxx.

template<typename T>
virtual qi::PropertyImpl< T >::~PropertyImpl ( )
inlinevirtual

Definition at line 56 of file property.hpp.

Member Function Documentation

template<typename T >
T qi::PropertyImpl< T >::get ( ) const

Definition at line 35 of file property.hxx.

template<typename T>
void qi::PropertyImpl< T >::operator= ( const T &  v)
inline

Definition at line 59 of file property.hpp.

template<typename T>
void qi::PropertyImpl< T >::set ( const T &  v)

Definition at line 43 of file property.hxx.

Member Data Documentation

template<typename T>
Getter qi::PropertyImpl< T >::_getter
protected

Definition at line 61 of file property.hpp.

template<typename T>
Setter qi::PropertyImpl< T >::_setter
protected

Definition at line 62 of file property.hpp.

template<typename T>
T qi::PropertyImpl< T >::_value
protected

Definition at line 63 of file property.hpp.


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