66 FXMutexLock locker(
myLock);
74 typename std::vector< GLObjectValuePassConnector<T>* >::iterator i = std::find(
myContainer.begin(),
myContainer.end(),
this);
89 FXMutexLock locker(
myLock);
91 connector->passValue();
99 FXMutexLock locker(
myLock);
113 FXMutexLock locker(
myLock);
115 if ((*i)->myObject.getGlID() == o.
getGlID()) {
Class passing values from a GUIGlObject to another object.
static void clear()
Deletes all instances.
GUIGlObject & myObject
The object to get the values of (the object that must be active)
static std::vector< GLObjectValuePassConnector< T > * > myContainer
The container of items that shall be updated.
static void removeObject(GUIGlObject &o)
Removes all instances that pass values from the object with the given id.
static void updateAll()
Updates all instances (passes values)
ValueRetriever< T > * myRetriever
The destination for values.
GLObjectValuePassConnector< T > & operator=(const GLObjectValuePassConnector< T > &)
Invalidated assignment operator.
virtual ~GLObjectValuePassConnector()
Destructor.
static FXMutex myLock
The mutex used to avoid concurrent updates of the connectors container.
virtual bool passValue()
Passes the value to the retriever.
GLObjectValuePassConnector(GUIGlObject &o, ValueSource< T > *source, ValueRetriever< T > *retriever)
Constructor.
ValueSource< T > * mySource
The source for values.
GUIGlID getGlID() const
Returns the numerical id of the object.