reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

ofParameter< ParameterType > Class Template Reference

ofParameter holds a value and notifies its listeners when it changes. More...

#include <ofParameter.h>

Inheritance diagram for ofParameter< ParameterType >:
ofAbstractParameter

Public Member Functions

 ofParameter ()
 
 ofParameter (const ofParameter< ParameterType > &v)
 
 ofParameter (const ParameterType &v)
 
 ofParameter (const std::string &name, const ParameterType &v)
 
 ofParameter (const std::string &name, const ParameterType &v, const ParameterType &min, const ParameterType &max)
 
const ParameterType & get () const
 
const ParameterType * operator-> () const
 
 operator const ParameterType & () const
 
void setName (const std::string &name)
 
std::string getName () const
 
ParameterType getMin () const
 
ParameterType getMax () const
 
ParameterType getInit () const
 
void reInit ()
 
std::string toString () const
 
void fromString (const std::string &name)
 
template<class ListenerClass , typename ListenerMethod >
void addListener (ListenerClass *listener, ListenerMethod method, int prio=OF_EVENT_ORDER_AFTER_APP)
 
template<class ListenerClass , typename ListenerMethod >
void removeListener (ListenerClass *listener, ListenerMethod method, int prio=OF_EVENT_ORDER_AFTER_APP)
 
template<typename... Args>
std::unique_ptr< of::priv::AbstractEventToken > newListener (Args...args)
 
void enableEvents ()
 
void disableEvents ()
 
bool isSerializable () const
 
bool isReadOnly () const
 
std::string valueType () const
 
void makeReferenceTo (ofParameter< ParameterType > &mom)
 
ofParameter< ParameterType > & operator= (const ofParameter< ParameterType > &v)
 
const ParameterType & operator= (const ParameterType &v)
 
ParameterType operator++ (int v)
 
ofParameter< ParameterType > & operator++ ()
 
ParameterType operator-- (int v)
 
ofParameter< ParameterType > & operator-- ()
 
template<typename OtherType >
ofParameter< ParameterType > & operator+= (const OtherType &v)
 
template<typename OtherType >
ofParameter< ParameterType > & operator-= (const OtherType &v)
 
template<typename OtherType >
ofParameter< ParameterType > & operator*= (const OtherType &v)
 
template<typename OtherType >
ofParameter< ParameterType > & operator/= (const OtherType &v)
 
template<typename OtherType >
ofParameter< ParameterType > & operator%= (const OtherType &v)
 
template<typename OtherType >
ofParameter< ParameterType > & operator&= (const OtherType &v)
 
template<typename OtherType >
ofParameter< ParameterType > & operator|= (const OtherType &v)
 
template<typename OtherType >
ofParameter< ParameterType > & operator^= (const OtherType &v)
 
template<typename OtherType >
ofParameter< ParameterType > & operator<<= (const OtherType &v)
 
template<typename OtherType >
ofParameter< ParameterType > & operator>>= (const OtherType &v)
 
ofParameter< ParameterType > & set (const ParameterType &v)
 
ofParameter< ParameterType > & set (const std::string &name, const ParameterType &v)
 
ofParameter< ParameterType > & set (const std::string &name, const ParameterType &v, const ParameterType &min, const ParameterType &max)
 
ofParameter< ParameterType > & setWithoutEventNotifications (const ParameterType &v)
 
void setMin (const ParameterType &min)
 
void setMax (const ParameterType &max)
 
void setInit (const ParameterType &init)
 
void setSerializable (bool serializable)
 
std::shared_ptr< ofAbstractParameternewReference () const
 
void setParent (ofParameterGroup &_parent)
 
const ofParameterGroup getFirstParent () const
 
size_t getNumListeners () const
 
const void * getInternalObject () const
 
- Public Member Functions inherited from ofAbstractParameter
virtual ~ofAbstractParameter ()
 
virtual std::string type () const
 
virtual std::string getEscapedName () const
 
std::vector< std::string > getGroupHierarchyNames () const
 
template<typename ParameterType >
ofParameter< ParameterType > & cast ()
 
template<typename ParameterType >
const ofParameter< ParameterType > & cast () const
 
template<typename ParameterType , typename Friend >
ofReadOnlyParameter< ParameterType, Friend > & castReadOnly ()
 
template<typename ParameterType , typename Friend >
const ofReadOnlyParameter< ParameterType, Friend > & castReadOnly () const
 
ofParameterGroupcastGroup ()
 
const ofParameterGroupcastGroup () const
 
virtual bool isReferenceTo (const ofAbstractParameter &other) const
 

Friends

template<typename T , typename F >
class ofReadOnlyParameter
 

Additional Inherited Members

- Protected Member Functions inherited from ofAbstractParameter
virtual std::string escape (const std::string &str) const
 

Detailed Description

template<typename ParameterType>
class ofParameter< ParameterType >

ofParameter holds a value and notifies its listeners when it changes.

ofParameter can be used as the value itself. For example an ofParameter<int> can be added, multiplied, substracted, etc with another number.

For an ofParameter with a custom object such as ofParameter<MyObject> myObject, MyObject's methods can be accessed using pointer syntax, e.g. myObject->myMethod();.

Template Parameters
ParameterTypeThe data wrapped by the ofParameter.

Constructor & Destructor Documentation

◆ ofParameter() [1/5]

template<typename ParameterType >
ofParameter< ParameterType >::ofParameter ( )

◆ ofParameter() [2/5]

template<typename ParameterType >
ofParameter< ParameterType >::ofParameter ( const ofParameter< ParameterType > &  v)

◆ ofParameter() [3/5]

template<typename ParameterType >
ofParameter< ParameterType >::ofParameter ( const ParameterType &  v)

◆ ofParameter() [4/5]

template<typename ParameterType >
ofParameter< ParameterType >::ofParameter ( const std::string &  name,
const ParameterType &  v 
)

◆ ofParameter() [5/5]

template<typename ParameterType >
ofParameter< ParameterType >::ofParameter ( const std::string &  name,
const ParameterType &  v,
const ParameterType &  min,
const ParameterType &  max 
)

Member Function Documentation

◆ addListener()

template<typename ParameterType >
template<class ListenerClass , typename ListenerMethod >
void ofParameter< ParameterType >::addListener ( ListenerClass *  listener,
ListenerMethod  method,
int  prio = OF_EVENT_ORDER_AFTER_APP 
)
inline

◆ disableEvents()

template<typename ParameterType >
void ofParameter< ParameterType >::disableEvents ( )

◆ enableEvents()

template<typename ParameterType >
void ofParameter< ParameterType >::enableEvents ( )

◆ fromString()

template<typename ParameterType >
void ofParameter< ParameterType >::fromString ( const std::string &  name)
inlinevirtual

Implements ofAbstractParameter.

◆ get()

template<typename ParameterType >
const ParameterType & ofParameter< ParameterType >::get ( ) const
inline

◆ getFirstParent()

template<typename ParameterType >
const ofParameterGroup ofParameter< ParameterType >::getFirstParent ( ) const
inlinevirtual

Implements ofAbstractParameter.

◆ getInit()

template<typename ParameterType >
ParameterType ofParameter< ParameterType >::getInit ( ) const

◆ getInternalObject()

template<typename ParameterType >
const void * ofParameter< ParameterType >::getInternalObject ( ) const
virtual

Implements ofAbstractParameter.

◆ getMax()

template<typename ParameterType >
ParameterType ofParameter< ParameterType >::getMax ( ) const

◆ getMin()

template<typename ParameterType >
ParameterType ofParameter< ParameterType >::getMin ( ) const

◆ getName()

template<typename ParameterType >
std::string ofParameter< ParameterType >::getName ( ) const
virtual

Implements ofAbstractParameter.

◆ getNumListeners()

template<typename ParameterType >
size_t ofParameter< ParameterType >::getNumListeners ( ) const

◆ isReadOnly()

template<typename ParameterType >
bool ofParameter< ParameterType >::isReadOnly ( ) const
virtual

Implements ofAbstractParameter.

◆ isSerializable()

template<typename ParameterType >
bool ofParameter< ParameterType >::isSerializable ( ) const
virtual

Implements ofAbstractParameter.

◆ makeReferenceTo()

template<typename ParameterType >
void ofParameter< ParameterType >::makeReferenceTo ( ofParameter< ParameterType > &  mom)

◆ newListener()

template<typename ParameterType >
template<typename... Args>
std::unique_ptr< of::priv::AbstractEventToken > ofParameter< ParameterType >::newListener ( Args...  args)
inline

◆ newReference()

template<typename ParameterType >
std::shared_ptr< ofAbstractParameter > ofParameter< ParameterType >::newReference ( ) const
virtual

Implements ofAbstractParameter.

◆ operator const ParameterType &()

template<typename ParameterType >
ofParameter< ParameterType >::operator const ParameterType & ( ) const
inline

◆ operator%=()

template<typename ParameterType >
template<typename OtherType >
ofParameter< ParameterType > & ofParameter< ParameterType >::operator%= ( const OtherType &  v)
inline

◆ operator&=()

template<typename ParameterType >
template<typename OtherType >
ofParameter< ParameterType > & ofParameter< ParameterType >::operator&= ( const OtherType &  v)
inline

◆ operator*=()

template<typename ParameterType >
template<typename OtherType >
ofParameter< ParameterType > & ofParameter< ParameterType >::operator*= ( const OtherType &  v)
inline

◆ operator++() [1/2]

template<typename ParameterType >
ofParameter< ParameterType > & ofParameter< ParameterType >::operator++ ( )
inline

◆ operator++() [2/2]

template<typename ParameterType >
ParameterType ofParameter< ParameterType >::operator++ ( int  v)
inline

◆ operator+=()

template<typename ParameterType >
template<typename OtherType >
ofParameter< ParameterType > & ofParameter< ParameterType >::operator+= ( const OtherType &  v)
inline

◆ operator--() [1/2]

template<typename ParameterType >
ofParameter< ParameterType > & ofParameter< ParameterType >::operator-- ( )
inline

◆ operator--() [2/2]

template<typename ParameterType >
ParameterType ofParameter< ParameterType >::operator-- ( int  v)
inline

◆ operator-=()

template<typename ParameterType >
template<typename OtherType >
ofParameter< ParameterType > & ofParameter< ParameterType >::operator-= ( const OtherType &  v)
inline

◆ operator->()

template<typename ParameterType >
const ParameterType * ofParameter< ParameterType >::operator-> ( ) const
inline

◆ operator/=()

template<typename ParameterType >
template<typename OtherType >
ofParameter< ParameterType > & ofParameter< ParameterType >::operator/= ( const OtherType &  v)
inline

◆ operator<<=()

template<typename ParameterType >
template<typename OtherType >
ofParameter< ParameterType > & ofParameter< ParameterType >::operator<<= ( const OtherType &  v)
inline

◆ operator=() [1/2]

template<typename ParameterType >
ofParameter< ParameterType > & ofParameter< ParameterType >::operator= ( const ofParameter< ParameterType > &  v)
inline

◆ operator=() [2/2]

template<typename ParameterType >
const ParameterType & ofParameter< ParameterType >::operator= ( const ParameterType &  v)
inline

◆ operator>>=()

template<typename ParameterType >
template<typename OtherType >
ofParameter< ParameterType > & ofParameter< ParameterType >::operator>>= ( const OtherType &  v)
inline

◆ operator^=()

template<typename ParameterType >
template<typename OtherType >
ofParameter< ParameterType > & ofParameter< ParameterType >::operator^= ( const OtherType &  v)
inline

◆ operator|=()

template<typename ParameterType >
template<typename OtherType >
ofParameter< ParameterType > & ofParameter< ParameterType >::operator|= ( const OtherType &  v)

◆ reInit()

template<typename ParameterType >
void ofParameter< ParameterType >::reInit ( )

◆ removeListener()

template<typename ParameterType >
template<class ListenerClass , typename ListenerMethod >
void ofParameter< ParameterType >::removeListener ( ListenerClass *  listener,
ListenerMethod  method,
int  prio = OF_EVENT_ORDER_AFTER_APP 
)
inline

◆ set() [1/3]

template<typename ParameterType >
ofParameter< ParameterType > & ofParameter< ParameterType >::set ( const ParameterType &  v)
inline

◆ set() [2/3]

template<typename ParameterType >
ofParameter< ParameterType > & ofParameter< ParameterType >::set ( const std::string &  name,
const ParameterType &  v 
)

◆ set() [3/3]

template<typename ParameterType >
ofParameter< ParameterType > & ofParameter< ParameterType >::set ( const std::string &  name,
const ParameterType &  v,
const ParameterType &  min,
const ParameterType &  max 
)

◆ setInit()

template<typename ParameterType >
void ofParameter< ParameterType >::setInit ( const ParameterType &  init)

◆ setMax()

template<typename ParameterType >
void ofParameter< ParameterType >::setMax ( const ParameterType &  max)

◆ setMin()

template<typename ParameterType >
void ofParameter< ParameterType >::setMin ( const ParameterType &  min)

◆ setName()

template<typename ParameterType >
void ofParameter< ParameterType >::setName ( const std::string &  name)
virtual

Implements ofAbstractParameter.

◆ setParent()

template<typename ParameterType >
void ofParameter< ParameterType >::setParent ( ofParameterGroup _parent)
virtual

Implements ofAbstractParameter.

◆ setSerializable()

template<typename ParameterType >
void ofParameter< ParameterType >::setSerializable ( bool  serializable)
virtual

Implements ofAbstractParameter.

◆ setWithoutEventNotifications()

template<typename ParameterType >
ofParameter< ParameterType > & ofParameter< ParameterType >::setWithoutEventNotifications ( const ParameterType &  v)
inline

◆ toString()

template<typename ParameterType >
std::string ofParameter< ParameterType >::toString ( ) const
inlinevirtual

Implements ofAbstractParameter.

◆ valueType()

template<typename ParameterType >
std::string ofParameter< ParameterType >::valueType ( ) const
virtual

Implements ofAbstractParameter.

Friends And Related Symbol Documentation

◆ ofReadOnlyParameter

template<typename ParameterType >
template<typename T , typename F >
friend class ofReadOnlyParameter
friend

The documentation for this class was generated from the following file:
  • /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/types/ofParameter.h