AndroMeta  2.0.0
Public Member Functions
Meta::MMLSharedVar Class Reference

Provides thread-safe protected access to an MVar. More...

#include <MMLSharedVar.h>

Inheritance diagram for Meta::MMLSharedVar:
Meta::MMLEntity Meta::MObject Meta::MProcessor Meta::MObjectBase

List of all members.

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)

Detailed Description

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.


Constructor & Destructor Documentation

Constructor.

Parameters:
vSpecifies the initial mvar.

Constructor.

Destructor.


Member Function Documentation

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.


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