Back to index

easystroke  0.5.5.1
Public Member Functions | Protected Member Functions | Private Attributes
Var< T > Class Template Reference

#include <var.h>

Inheritance diagram for Var< T >:
Inheritance graph
[legend]
Collaboration diagram for Var< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Var (Out< T > &in_)
virtual void notify ()
virtual void set (const T x_)
virtual T get () const
void connect (Base *s)

Protected Member Functions

void update ()

Private Attributes

Out< T > & in
x

Detailed Description

template<class T>
class Var< T >

Definition at line 86 of file var.h.


Constructor & Destructor Documentation

template<class T >
Var< T >::Var ( Out< T > &  in_) [inline]

Definition at line 90 of file var.h.

: in(in_), x(in.get()) { in.connect(this); }

Member Function Documentation

template<class T>
void Out< T >::connect ( Base s) [inline, inherited]

Definition at line 54 of file var.h.

{ out.insert(s); }

Here is the caller graph for this function:

template<class T >
virtual T Var< T >::get ( ) const [inline, virtual]

Implements Out< T >.

Definition at line 96 of file var.h.

{ return x; }
template<class T >
virtual void Var< T >::notify ( ) [inline, virtual]

Implements Base.

Definition at line 91 of file var.h.

{ set(in.get()); }
template<class T >
virtual void Var< T >::set ( const T  x_) [inline, virtual]

Implements In< T >.

Definition at line 92 of file var.h.

                                    {
              x = x_;
              Out<T>::update();
       }

Here is the call graph for this function:

template<class T>
void Out< T >::update ( ) [inline, protected, inherited]

Definition at line 49 of file var.h.

                     {
              for (std::set<Base *>::iterator i = out.begin(); i != out.end(); i++)
                     (*i)->notify();
       }

Here is the caller graph for this function:


Member Data Documentation

template<class T >
Out<T>& Var< T >::in [private]

Definition at line 87 of file var.h.

template<class T >
T Var< T >::x [private]

Definition at line 88 of file var.h.


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