|
AndroMeta
2.0.0
|
Provides thread-safe protected access to an MVar. More...
#include <MMLSharedVar.h>
Public Member Functions | |
| MMLSharedVar (const mvar &v) | |
| MMLSharedVar () | |
| ~MMLSharedVar () | |
| mnode | process (mnode n, uint32_t flags=0) |
| mvar | get () |
| mvar | get (const mvar &key) |
| void | merge (const mvar &v) |
| void | merge (const mvar &key, const mvar &v) |
| void | set (const mvar &v) |
| void | set (const mvar &key, const mvar &v) |
Provides thread-safe protected access to an MVar.
MMLSharedVar is useful to MML programs in situations when communication via events is not an efficient option. See examples/robots for an example of how this class is typically used.
| Meta::MMLSharedVar::MMLSharedVar | ( | const mvar & | v | ) |
Constructor.
| v | Specifies the initial mvar. |
Constructor.
Destructor.
Get a copy of the shared mvar in its entirety.
| mvar Meta::MMLSharedVar::get | ( | const mvar & | key | ) |
Get a copy of the shared mvar indexed on key.
| void Meta::MMLSharedVar::merge | ( | const mvar & | v | ) |
Merge this mvar with another mvar.
| void Meta::MMLSharedVar::merge | ( | const mvar & | key, |
| const mvar & | v | ||
| ) |
Merge this mvar with another mvar, indexing on the specified key.
| mnode Meta::MMLSharedVar::process | ( | mnode | n, |
| uint32_t | flags = 0 |
||
| ) | [virtual] |
Process method.
Reimplemented from Meta::MMLEntity.
| void Meta::MMLSharedVar::set | ( | const mvar & | v | ) |
Set the value of the shared mvar.
| void Meta::MMLSharedVar::set | ( | const mvar & | key, |
| const mvar & | v | ||
| ) |
Set the value of the shared mvar indexed by key to value v.
1.7.6.1