reference

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

ofReadOnlyParameter< ParameterType, Friend > Class Template Reference

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

#include <ofParameter.h>

Inheritance diagram for ofReadOnlyParameter< ParameterType, Friend >:
ofAbstractParameter

Public Member Functions

 ofReadOnlyParameter ()
 
 ofReadOnlyParameter (const ParameterType &v)
 
 ofReadOnlyParameter (const std::string &name, const ParameterType &v)
 
 ofReadOnlyParameter (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
 
std::string getName () const
 
ParameterType getMin () const
 
ParameterType getMax () const
 
std::string toString () const
 
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)
 
std::shared_ptr< ofAbstractParameternewReference () const
 
template<typename... Args>
std::unique_ptr< of::priv::AbstractEventToken > newListener (Args...args)
 
bool isSerializable () const
 
bool isReadOnly () const
 
std::string valueType () 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
 

Protected Member Functions

void setName (const std::string &name)
 
void enableEvents ()
 
void disableEvents ()
 
void setSerializable (bool s)
 
template<typename OtherFriend >
void makeReferenceTo (ofReadOnlyParameter< ParameterType, OtherFriend > mom)
 
void makeReferenceTo (ofParameter< ParameterType > mom)
 
ofReadOnlyParameter< ParameterType, Friend > & operator= (const ofReadOnlyParameter< ParameterType, Friend > &v)
 
ofReadOnlyParameter< ParameterType, Friend > & operator= (const ofParameter< ParameterType > &v)
 
const ParameterType & operator= (const ParameterType &v)
 
ParameterType operator++ (int v)
 
ofReadOnlyParameter< ParameterType, Friend > & operator++ ()
 
ParameterType operator-- (int v)
 
ofReadOnlyParameter< ParameterType, Friend > & operator-- ()
 
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & operator+= (const OtherType &v)
 
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & operator-= (const OtherType &v)
 
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & operator*= (const OtherType &v)
 
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & operator/= (const OtherType &v)
 
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & operator%= (const OtherType &v)
 
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & operator&= (const OtherType &v)
 
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & operator|= (const OtherType &v)
 
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & operator^= (const OtherType &v)
 
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & operator<<= (const OtherType &v)
 
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & operator>>= (const OtherType &v)
 
ofReadOnlyParameter< ParameterType, Friend > & set (const ParameterType &v)
 
ofReadOnlyParameter< ParameterType, Friend > & set (const std::string &name, const ParameterType &value)
 
ofReadOnlyParameter< ParameterType, Friend > & set (const std::string &name, const ParameterType &value, const ParameterType &min, const ParameterType &max)
 
void setMin (const ParameterType &min)
 
void setMax (const ParameterType &max)
 
void setInit (const ParameterType &init)
 
void fromString (const std::string &str)
 
void setParent (ofParameterGroup &_parent)
 
const ofParameterGroup getFirstParent () const
 
const void * getInternalObject () const
 
- Protected Member Functions inherited from ofAbstractParameter
virtual std::string escape (const std::string &str) const
 

Protected Attributes

ofParameter< ParameterType > parameter
 
friend Friend
 

Friends

template<typename T >
class ofParameter
 
class ofParameterGroup
 
template<typename T , typename OtherFriend >
class ofReadOnlyParameter
 

Detailed Description

template<typename ParameterType, typename Friend>
class ofReadOnlyParameter< ParameterType, Friend >

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

ofReadOnlyParameter is a "read only" version of ofPareameter. "Friend" classes specified in the template arguments allow other classes write-access to the internal data. Otherwise, all other access is "read only".

See also
ofParameter
Template Parameters
ParameterTypeThe data wrapped by the ofParameter.
FriendThe type of the "friend" class with write access.

Constructor & Destructor Documentation

◆ ofReadOnlyParameter() [1/4]

template<typename ParameterType , typename Friend >
ofReadOnlyParameter< ParameterType, Friend >::ofReadOnlyParameter ( )
inline

◆ ofReadOnlyParameter() [2/4]

template<typename ParameterType , typename Friend >
ofReadOnlyParameter< ParameterType, Friend >::ofReadOnlyParameter ( const ParameterType &  v)
inline

◆ ofReadOnlyParameter() [3/4]

template<typename ParameterType , typename Friend >
ofReadOnlyParameter< ParameterType, Friend >::ofReadOnlyParameter ( const std::string &  name,
const ParameterType &  v 
)
inline

◆ ofReadOnlyParameter() [4/4]

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

Member Function Documentation

◆ addListener()

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

◆ disableEvents()

template<typename ParameterType , typename Friend >
void ofReadOnlyParameter< ParameterType, Friend >::disableEvents ( )
inlineprotected

◆ enableEvents()

template<typename ParameterType , typename Friend >
void ofReadOnlyParameter< ParameterType, Friend >::enableEvents ( )
inlineprotected

◆ fromString()

template<typename ParameterType , typename Friend >
void ofReadOnlyParameter< ParameterType, Friend >::fromString ( const std::string &  str)
inlineprotectedvirtual

Implements ofAbstractParameter.

◆ get()

template<typename ParameterType , typename Friend >
const ParameterType & ofReadOnlyParameter< ParameterType, Friend >::get ( ) const
inline

◆ getFirstParent()

template<typename ParameterType , typename Friend >
const ofParameterGroup ofReadOnlyParameter< ParameterType, Friend >::getFirstParent ( ) const
inlineprotectedvirtual

Implements ofAbstractParameter.

◆ getInternalObject()

template<typename ParameterType , typename Friend >
const void * ofReadOnlyParameter< ParameterType, Friend >::getInternalObject ( ) const
inlineprotectedvirtual

Implements ofAbstractParameter.

◆ getMax()

template<typename ParameterType , typename Friend >
ParameterType ofReadOnlyParameter< ParameterType, Friend >::getMax ( ) const
inline

◆ getMin()

template<typename ParameterType , typename Friend >
ParameterType ofReadOnlyParameter< ParameterType, Friend >::getMin ( ) const
inline

◆ getName()

template<typename ParameterType , typename Friend >
std::string ofReadOnlyParameter< ParameterType, Friend >::getName ( ) const
inlinevirtual

Implements ofAbstractParameter.

◆ isReadOnly()

template<typename ParameterType , typename Friend >
bool ofReadOnlyParameter< ParameterType, Friend >::isReadOnly ( ) const
inlinevirtual

Implements ofAbstractParameter.

◆ isSerializable()

template<typename ParameterType , typename Friend >
bool ofReadOnlyParameter< ParameterType, Friend >::isSerializable ( ) const
inlinevirtual

Implements ofAbstractParameter.

◆ makeReferenceTo() [1/2]

template<typename ParameterType , typename Friend >
void ofReadOnlyParameter< ParameterType, Friend >::makeReferenceTo ( ofParameter< ParameterType >  mom)
protected

◆ makeReferenceTo() [2/2]

template<typename ParameterType , typename Friend >
template<typename OtherFriend >
void ofReadOnlyParameter< ParameterType, Friend >::makeReferenceTo ( ofReadOnlyParameter< ParameterType, OtherFriend >  mom)
inlineprotected

◆ newListener()

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

◆ newReference()

template<typename ParameterType , typename Friend >
std::shared_ptr< ofAbstractParameter > ofReadOnlyParameter< ParameterType, Friend >::newReference ( ) const
virtual

Implements ofAbstractParameter.

◆ operator const ParameterType &()

template<typename ParameterType , typename Friend >
ofReadOnlyParameter< ParameterType, Friend >::operator const ParameterType & ( ) const
inline

◆ operator%=()

template<typename ParameterType , typename Friend >
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::operator%= ( const OtherType &  v)
inlineprotected

◆ operator&=()

template<typename ParameterType , typename Friend >
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::operator&= ( const OtherType &  v)
inlineprotected

◆ operator*=()

template<typename ParameterType , typename Friend >
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::operator*= ( const OtherType &  v)
inlineprotected

◆ operator++() [1/2]

template<typename ParameterType , typename Friend >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::operator++ ( )
inlineprotected

◆ operator++() [2/2]

template<typename ParameterType , typename Friend >
ParameterType ofReadOnlyParameter< ParameterType, Friend >::operator++ ( int  v)
inlineprotected

◆ operator+=()

template<typename ParameterType , typename Friend >
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::operator+= ( const OtherType &  v)
inlineprotected

◆ operator--() [1/2]

template<typename ParameterType , typename Friend >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::operator-- ( )
inlineprotected

◆ operator--() [2/2]

template<typename ParameterType , typename Friend >
ParameterType ofReadOnlyParameter< ParameterType, Friend >::operator-- ( int  v)
inlineprotected

◆ operator-=()

template<typename ParameterType , typename Friend >
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::operator-= ( const OtherType &  v)
inlineprotected

◆ operator->()

template<typename ParameterType , typename Friend >
const ParameterType * ofReadOnlyParameter< ParameterType, Friend >::operator-> ( ) const
inline

◆ operator/=()

template<typename ParameterType , typename Friend >
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::operator/= ( const OtherType &  v)
inlineprotected

◆ operator<<=()

template<typename ParameterType , typename Friend >
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::operator<<= ( const OtherType &  v)
inlineprotected

◆ operator=() [1/3]

template<typename ParameterType , typename Friend >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::operator= ( const ofParameter< ParameterType > &  v)
inlineprotected

◆ operator=() [2/3]

template<typename ParameterType , typename Friend >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::operator= ( const ofReadOnlyParameter< ParameterType, Friend > &  v)
inlineprotected

◆ operator=() [3/3]

template<typename ParameterType , typename Friend >
const ParameterType & ofReadOnlyParameter< ParameterType, Friend >::operator= ( const ParameterType &  v)
inlineprotected

◆ operator>>=()

template<typename ParameterType , typename Friend >
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::operator>>= ( const OtherType &  v)
inlineprotected

◆ operator^=()

template<typename ParameterType , typename Friend >
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::operator^= ( const OtherType &  v)
inlineprotected

◆ operator|=()

template<typename ParameterType , typename Friend >
template<typename OtherType >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::operator|= ( const OtherType &  v)
inlineprotected

◆ removeListener()

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

◆ set() [1/3]

template<typename ParameterType , typename Friend >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::set ( const ParameterType &  v)
inlineprotected

◆ set() [2/3]

template<typename ParameterType , typename Friend >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::set ( const std::string &  name,
const ParameterType &  value 
)
inlineprotected

◆ set() [3/3]

template<typename ParameterType , typename Friend >
ofReadOnlyParameter< ParameterType, Friend > & ofReadOnlyParameter< ParameterType, Friend >::set ( const std::string &  name,
const ParameterType &  value,
const ParameterType &  min,
const ParameterType &  max 
)
inlineprotected

◆ setInit()

template<typename ParameterType , typename Friend >
void ofReadOnlyParameter< ParameterType, Friend >::setInit ( const ParameterType &  init)
inlineprotected

◆ setMax()

template<typename ParameterType , typename Friend >
void ofReadOnlyParameter< ParameterType, Friend >::setMax ( const ParameterType &  max)
inlineprotected

◆ setMin()

template<typename ParameterType , typename Friend >
void ofReadOnlyParameter< ParameterType, Friend >::setMin ( const ParameterType &  min)
inlineprotected

◆ setName()

template<typename ParameterType , typename Friend >
void ofReadOnlyParameter< ParameterType, Friend >::setName ( const std::string &  name)
inlineprotectedvirtual

Implements ofAbstractParameter.

◆ setParent()

template<typename ParameterType , typename Friend >
void ofReadOnlyParameter< ParameterType, Friend >::setParent ( ofParameterGroup _parent)
protectedvirtual

Implements ofAbstractParameter.

◆ setSerializable()

template<typename ParameterType , typename Friend >
void ofReadOnlyParameter< ParameterType, Friend >::setSerializable ( bool  s)
inlineprotectedvirtual

Implements ofAbstractParameter.

◆ toString()

template<typename ParameterType , typename Friend >
std::string ofReadOnlyParameter< ParameterType, Friend >::toString ( ) const
inlinevirtual

Implements ofAbstractParameter.

◆ valueType()

template<typename ParameterType , typename Friend >
std::string ofReadOnlyParameter< ParameterType, Friend >::valueType ( ) const
virtual

Implements ofAbstractParameter.

Friends And Related Symbol Documentation

◆ ofParameter

template<typename ParameterType , typename Friend >
template<typename T >
friend class ofParameter
friend

◆ ofParameterGroup

template<typename ParameterType , typename Friend >
friend class ofParameterGroup
friend

◆ ofReadOnlyParameter

template<typename ParameterType , typename Friend >
template<typename T , typename OtherFriend >
friend class ofReadOnlyParameter
friend

Member Data Documentation

◆ Friend

template<typename ParameterType , typename Friend >
friend ofReadOnlyParameter< ParameterType, Friend >::Friend
protected

◆ parameter

template<typename ParameterType , typename Friend >
ofParameter<ParameterType> ofReadOnlyParameter< ParameterType, Friend >::parameter
protected

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