AndroMeta  2.0.0
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends
Meta::MObject Class Reference

Provides the M interpreter, storing/restoring objects, distributed objects, and more. More...

#include <MObject.h>

Inheritance diagram for Meta::MObject:
Meta::MProcessor Meta::MObjectBase Meta::MAuth Meta::MLibBase Meta::MMage Meta::MMLEntity Meta::MRandom Meta::MVideoEncoderBase Meta::MLib Meta::MDLDomain Meta::MMLGrid Meta::MMLRoot Meta::MMLSharedVar Meta::MVideoEncoder

List of all members.

Public Types

enum  AttributeMode {
  Raw, Exists, TryProtected, TryProtectedExists,
  Protected
}

Public Member Functions

 MObject ()
 MObject (MBrokerBase *broker)
 MObject (const MObject &object)
 MObject (const mvar &v, RestoreOpt opt)
virtual ~MObject ()
virtual void store (mvar &v) const
virtual void autostore (mvar &v) const
virtual MObjectBaseclone () const
MObjectoperator= (const MObject &object)
virtual bool instanceOf (ClassIdType classId) const
virtual mnode process (mnode n, uint32_t flags=0)
virtual mnode autoprocess (mnode n, uint32_t flags=0)
mvar eval (const mvar &code)
mnode method (const mstr &name, size_t inputs)
mnode method (size_t i)
size_t methodCount () const
void setMethod (mnode sig, mnode body)
void setAttribute (const mstr &name, mnode n, AttributeMode mode=Raw)
mnode attribute (const mstr &name, AttributeMode mode=Raw)
mnode attribute (size_t i)
size_t attributeCount () const
mstr attributeName (size_t i) const
void clearAttribute (const mstr &name)
mnode remoteProcess (mnode f, bool block=true, mnode fail=0)
bool isRemote () const
bool isDistributed () const
bool isLocal () const
MBrokerBasebroker ()
mvarsession ()
const mvarsession () const
virtual void onClientClosed (const mvar &session)
virtual void onServerClosed ()
bool isConnected () const
bool release ()
void setSharedScope (MObject *object)
void setSharedScope ()
void enableInterrupts (bool flag)
bool inVirtual ()
void setStrict (bool flag)
bool isStrict () const
void setExact (bool flag)
bool isExact () const
virtual void enableRestricted ()
bool isRestricted () const
void ref ()
size_t deref ()
void setOutputStream (std::ostream &ostr)
std::ostream & outputStream () const
mnode Ctor_ (mnode n1, mnode n2, mnode n3, mnode n4)
mnode Ret_ (mnode n)
mnode Def_ (mnode s, mnode v)
mnode Def_ (mnode scope, mnode s, mnode v)
mnode Param_ (mnode n)
mnode Len_ (mnode n)
mnode Undef_ (mnode n)
mnode For_ (mnode n1, mnode n2, mnode n3, mnode n4)
mnode ForEach_ (mnode item, mnode sequence, mnode block)
mnode ForVec_ (mnode n1, mnode n2, mnode n3)
mnode ForList_ (mnode n1, mnode n2, mnode n3)
mnode ForVec_ (mnode n1, mnode n2, mnode n3, mnode n4)
mnode ForList_ (mnode n1, mnode n2, mnode n3, mnode n4)
mnode Throw_ (mnode n, mnode msg)
mnode Throw_ (mnode n, mnode msg, mnode type)
mnode Get_ (mnode n)
mnode Get_ (mnode n, mnode nk)
mnode Set_ (mnode n, mnode v)
mnode Idx_ (mnode n, mnode nk)
mnode IdxR_ (mnode n, mnode nk)
mnode Symbols_ ()
mnode Attrs_ ()
mnode Functions_ ()
mnode Methods_ ()
mnode LRec_ (mnode n)
mnode LRec_ (mnode n, mnode k, mnode all)
mnode RRec_ (mnode n)
mnode RRec_ (mnode n, mnode k, mnode all)
mnode Flatten_ (mnode n1)
mnode GetI_ (mnode s)
mnode MGet_ (mnode s)
mnode PushScope_ (mnode s)
mnode PushScope_ (mnode o, mnode s)
mnode SetSharedScope_ (mnode o, mnode s)
mnode Reset_ ()
mnode ResetGlobal_ ()
mnode ReDef_ (mnode s, mnode v)
mnode PopScope_ ()
mnode Scope_ ()
mnode Scope_ (mnode s)
mnode TopScope_ (mnode i)
mnode Scope_ (mnode s, mnode f)
mnode Class_ (mnode n1, mnode n2)
mnode MergeScope_ (mnode s1, mnode s2)
mnode OuterMergeScope_ (mnode s1, mnode s2)
mnode Ex_ (mnode n)
mnode Eval_ (mnode n)
mnode PreEval_ (mnode n1, mnode n2)
mnode CEval_ (mnode n)
mnode CEval_ (mnode n1, mnode n2)
mnode Lambda_ (mnode n1, mnode n2, mnode n3)
mnode Scoped_ (mnode f)
mnode Neg_ (mnode v)
mnode Add_ (mnode v1, mnode v2)
mnode Sub_ (mnode v1, mnode v2)
mnode Mul_ (mnode v1, mnode v2)
mnode Div_ (mnode v1, mnode v2)
mnode Inv_ (mnode v)
mnode Pow_ (mnode v1, mnode v2)
mnode Mod_ (mnode v1, mnode v2)
mnode Inc_ (mnode v)
mnode IncP_ (mnode v)
mnode Dec_ (mnode v)
mnode DecP_ (mnode v)
mnode AddA_ (mnode v1, mnode v2)
mnode SubA_ (mnode v1, mnode v2)
mnode MulA_ (mnode v1, mnode v2)
mnode DivA_ (mnode v1, mnode v2)
mnode ModA_ (mnode v1, mnode v2)
mnode Pi_ ()
mnode Euler_ ()
mnode Catalan_ ()
mnode Sqrt_ (mnode v)
mnode Abs_ (mnode v)
mnode Log10_ (mnode v)
mnode Ln_ (mnode v)
mnode Cos_ (mnode v)
mnode ACos_ (mnode v)
mnode CosH_ (mnode v)
mnode Sin_ (mnode v)
mnode ASin_ (mnode v)
mnode SinH_ (mnode v)
mnode Tan_ (mnode v)
mnode Cot_ (mnode v)
mnode ACot_ (mnode v)
mnode ATan_ (mnode v)
mnode ATan2_ (mnode y, mnode x)
mnode TanH_ (mnode v)
mnode Sec_ (mnode v)
mnode Csc_ (mnode v)
mnode SecH_ (mnode v)
mnode CscH_ (mnode v)
mnode ASec_ (mnode v)
mnode ACsc_ (mnode v)
mnode ASecH_ (mnode v)
mnode ACscH_ (mnode v)
mnode CotH_ (mnode v)
mnode ACotH_ (mnode v)
mnode ATanH_ (mnode v)
mnode ASinH_ (mnode v)
mnode ACosH_ (mnode v)
mnode Floor_ (mnode v)
mnode Ceil_ (mnode v)
mnode Exp_ (mnode v)
mnode Round_ (mnode v)
mnode Round_ (mnode v, mnode precision)
mnode If_ (mnode n1, mnode n2)
mnode If_ (mnode n1, mnode n2, mnode n3)
mnode Not_ (mnode n)
mnode And_ (mnode n1, mnode n2)
mnode Or_ (mnode n1, mnode n2)
mnode XOr_ (mnode n1, mnode n2)
mnode LT_ (mnode v1, mnode v2)
mnode GT_ (mnode v1, mnode v2)
mnode LE_ (mnode v1, mnode v2)
mnode GE_ (mnode v1, mnode v2)
mnode Eq_ (mnode v1, mnode v2)
mnode NE_ (mnode v1, mnode v2)
mnode Max_ (mnode v1, mnode v2)
mnode Min_ (mnode v1, mnode v2)
mnode While_ (mnode n1, mnode n2)
mnode Print_ (mnode n)
mnode Log_ (mnode n)
mnode Head_ (mnode n)
mnode Back_ (mnode n)
mnode Elem_ (mnode n, mnode ni)
mnode Itp_ (mnode s, mnode si)
mnode New_ (mnode n)
mnode Create_ (mnode n)
mnode Delete_ (mnode n)
mnode Clone_ (mnode n)
mnode Copy_ (mnode n)
mnode Call_ (mnode f)
mnode Args_ (mnode f)
mnode Params_ (mnode f)
mnode NamedArg_ (mnode s, mnode v)
mnode Once_ (mnode f)
mnode GetF_ (mnode f, mnode s, mnode p)
mnode Attr_ (mnode s)
mnode Attr_ (mnode s, mnode v)
mnode Var_ (mnode n1)
mnode Var_ (mnode n1, mnode n2)
mnode VSet_ (mnode n1, mnode n2)
mnode Type_ (mnode n1, mnode n2, mnode n3)
mnode Type_ (mnode n1, mnode n2, mnode n3, mnode n4)
mnode Method_ (mnode n1, mnode n2, mnode n3)
mnode Value_ (mnode n1, mnode n2, mnode n3)
mnode Expand_ (mnode n)
mnode Import_ (mnode n)
mnode MCode_ (mnode n)
mnode CodeData_ (mnode n)
mnode Show_ (mnode s)
mnode IsFunction_ (mnode n)
mnode IsSymbol_ (mnode n)
mnode IsNumeric_ (mnode n)
mnode IsString_ (mnode n)
mnode IsConstant_ (mnode n)
mnode IsTrue_ (mnode n)
mnode IsFalse_ (mnode n)
mnode Real_ (mnode r)
mnode Cls_ (mnode n)
mnode PushBack_ (mnode v, mnode x)
mnode PushFront_ (mnode v, mnode x)
mnode Push_ (mnode v, mnode x)
mnode PopBack_ (mnode v)
mnode PopFront_ (mnode v)
mnode Pop_ (mnode v)
mnode HasKey_ (mnode v, mnode k)
mnode Keys_ (mnode v)
mnode IsDefined_ (mnode v)
mnode IsEmpty_ (mnode v)
mnode Index_ (mnode v, mnode x)
mnode Index_ (mnode v, mnode x, mnode start)
mnode Index_ (mnode v, mnode x, mnode start, mnode end)
mnode Erase_ (mnode v, mnode k)
mnode Split_ (mnode v, mnode delimiter, mnode maxTokens)
mnode Split_ (mnode v, mnode delimiter)
mnode Join_ (mnode v, mnode delimiter)
mnode IndexMap_ (mnode v, mnode flag)
mnode ClearSeq_ (mnode v)
mnode ClearMap_ (mnode v)
mnode Clear_ (mnode v)
mnode Size_ (mnode v)
mnode Merge_ (mnode v1, mnode v2)
mnode ReplaceSymbols_ (mnode f, mnode m)
mnode Pass_ ()
mnode NoOp_ ()
mnode Info_ (mnode n)
mnode Break_ ()
mnode Continue_ ()
mnode Super_ (mnode n1, mnode n2)
mnode Unite_ (mnode v)
mnode Unite_ (mnode v1, mnode v2)
mnode Unite_ (mnode v1, mnode v2, mnode outer)
mnode Union_ (mnode v1, mnode v2)
mnode Intersect_ (mnode v1, mnode v2)
mnode Intersect_ (mnode v1, mnode v2, mnode outer)
mnode Intersection_ (mnode v1, mnode v2)
mnode ComplementA_ (mnode v1, mnode v2)
mnode Complement_ (mnode v1, mnode v2)
mnode SubsumesData_ (mnode v1, mnode v2)
mnode Range_ (mnode end)
mnode Range_ (mnode start, mnode end)
mnode Range_ (mnode start, mnode end, mnode increment)
mnode ListRange_ (mnode end)
mnode ListRange_ (mnode start, mnode end)
mnode ListRange_ (mnode start, mnode end, mnode increment)
mnode Finish_ ()
mnode Finish_ (mnode value)
mnode SymToStr_ (mnode sym)
mnode StrToSym_ (mnode str)

Static Public Member Functions

static bool isStandardType (const mstr &type)

Static Public Attributes

static const ClassIdType ClassId

Friends

class MObject_

Detailed Description

Provides the M interpreter, storing/restoring objects, distributed objects, and more.

MObject implements the M interpreter and the essential functions associated with it. M is a language based on functional programming principles which is both that which is processed by the M interpreter directly and at the same time, the basis of the AST (abstract syntax tree) used by the parsers and generators. All M functions begin in upper-case e.g: Add(), Def() -- some M functions evaluate their arguments while others are lazy or may perform partial evaluation, e.g: symbol lookup. Each MObject is effectively an interpreter with state allowing M methods/functions and attributes to be defined within. MObject also provides an interface that supports storing/restoring objects, and distributed functionality. Throughout the documentation, we refer to the client-side of a distributed object as a "remote object." And the server-side as the "distributed object." MObject is fully storeable/restoreable.


Member Enumeration Documentation

The attribute modes used for manipulating attributes.

Raw - set/retrieve directly by value.

Exists - same as Raw but throw an MError when attribute does not exist.

TryProtected - Try to manipulate the value through an accessor or mutator e.g: getX(), setX(value), falling back to raw mode if such a method does not exist.

TryProtectedExists - same as TryProtected but throws an MError when attribute does not exist.

Protected - manipulation must go through an accessor or mutator. If such a method does not exist, an MError is thrown.


Constructor & Destructor Documentation

Constructor.

Constructor that subclasses call to create a remote object.

Meta::MObject::MObject ( const MObject object)

Copy constructor.

Meta::MObject::MObject ( const mvar v,
RestoreOpt  opt 
)

Restore constructor.

virtual Meta::MObject::~MObject ( ) [virtual]

Destructor.


Member Function Documentation

Absolute value.

Arcosine.

Arc hyperbolic cosine.

Arc Cotangent.

Arc hyperbolic cotangent.

Arc cosecant.

Arc hyperbolic cosecant.

Addition.

Add to, i.e: +=

Logical AND with short-circuiting.

Evaluate the arguments of function f.

Arc secant.

Arc hyberbolic secant.

Arcsine.

Arc hyperbolic sine.

Arctangent 2.

Arctangent.

Arc hyperbolic tangent.

Get an attribute. Error if s does not exist.

Declare or the set the value of an existing attribute.

mnode Meta::MObject::attribute ( const mstr name,
AttributeMode  mode = Raw 
)

Get the named attribute.

Returns:
mnull on failure.

Get the i-th attribute.

Returns:
mnull on failure.
Returns:
A count of all attributes.
mstr Meta::MObject::attributeName ( size_t  i) const

Get the name of the i-th attribute.

Returns:
Empty string on failure.
Returns:
All attributes in scope.
virtual mnode Meta::MObject::autoprocess ( mnode  n,
uint32_t  flags = 0 
) [virtual]

Auto-generated process method. Do not implement.

Returns:
mnull if autoprocess() failed to process n. Default behavior is to simply return mnull.
virtual void Meta::MObject::autostore ( mvar v) const [virtual]

Auto-generated store method. Do not implement.

Return the last item in n's sequence or function arguments.

Break.

Returns:
This object's broker, or null if no broker.

Perform a call, evaluating function f's arguments first.

High precision Catalan constant.

Ceiling function.

Used for evaluation at the compilation/parsing stage.

Used for evaluation at the compilation/parsing stage.

Declare a class.

Functional version of MVar::clear().

void Meta::MObject::clearAttribute ( const mstr name)

Clear the named attribute.

Functional version of MVar::clearMap().

Functional version of MVar::clearSeq().

virtual MObjectBase* Meta::MObject::clone ( ) const [virtual]
Returns:
a copy of this object

Reimplemented from Meta::MObjectBase.

Reimplemented in Meta::MMLEntity, and Meta::MRandom.

Copy an object.

A closure, when evaluated n is returned.

Used to specifiy code which is to be treated as data and not executed.

Return the result of applying ComplementA to v1 and v2.

Functional version of MVar::complement().

Continue.

Returns:
A copy of the node n.

Cosine.

Hyperboic cosine.

Cotangent.

Hyperbolic cotangent.

Create a new object with managed memory deallocation.

Cosecant.

Hyperbolic cosecant.

mnode Meta::MObject::Ctor_ ( mnode  n1,
mnode  n2,
mnode  n3,
mnode  n4 
)

Define a constructor.

Pre-decrement.

Post-decrement.

Lazy definition (v is not evaluated), used for defining a function or aliasing a symbol to a function.

e.g: Def(diff(a,b),Sub(a,b))

mnode Meta::MObject::Def_ ( mnode  scope,
mnode  s,
mnode  v 
)

Identical to Def(2), but define within specified scope.

e.g: Def(Global,x,10)

Delete an object.

Division.

Divide by, i.e: /=

Extract an element from a node, e.g: Elem(Add(1,2),0) => 1

void Meta::MObject::enableInterrupts ( bool  flag)

Set whether this object periodically checks interrupts. See MInterrupt. For performance reasons, the default is not to check for interrupts.

mnode Meta::MObject::Eq_ ( mnode  v1,
mnode  v2 
)

Equal to.

Functional version of MVar::erase().

High precision Euler constant.

mvar Meta::MObject::eval ( const mvar code)

Process code data at the head of an mvar. If the result contains symbolic data, it is converted to code data and returned.

Evaluate n.

Execute n.

Exponential function.

Expand a function containing Range() functions.

Finish used to stop execution in various contexts.

Finish used to stop execution in various contexts.

Perform the inverse of LRec() and RRec().

Floor function.

mnode Meta::MObject::For_ ( mnode  n1,
mnode  n2,
mnode  n3,
mnode  n4 
)

For loop.

mnode Meta::MObject::ForEach_ ( mnode  item,
mnode  sequence,
mnode  block 
)

Foreach loop.

mnode Meta::MObject::ForList_ ( mnode  n1,
mnode  n2,
mnode  n3 
)

For list.

mnode Meta::MObject::ForList_ ( mnode  n1,
mnode  n2,
mnode  n3,
mnode  n4 
)

For list with predicate.

mnode Meta::MObject::ForVec_ ( mnode  n1,
mnode  n2,
mnode  n3 
)

For vector.

mnode Meta::MObject::ForVec_ ( mnode  n1,
mnode  n2,
mnode  n3,
mnode  n4 
)

For vector with predicate.

Returns:
All functions in scope.
mnode Meta::MObject::GE_ ( mnode  v1,
mnode  v2 
)

Greater than or equal to.

Get a symbol value or function defintion from scope.

Index n with nk, creating the entry at nk if it doesn't exist.

Get a function definition.

Get a symbol from the immediate scope.

mnode Meta::MObject::GT_ ( mnode  v1,
mnode  v2 
)

Greater than.

Functional version of MVar::hasKey().

Head, e.g: Head(Neg(1)) => "Neg" or the head of an mvar.

Index n at nk, nk must be a valid key or an MError is thrown.

Index n at nk, returning a reference to the element, nk must be a valid key or an MError is thrown.

mnode Meta::MObject::If_ ( mnode  n1,
mnode  n2 
)

Conditional, if-then.

mnode Meta::MObject::If_ ( mnode  n1,
mnode  n2,
mnode  n3 
)

Conditional, if-then-else.

Import library functions.

Pre-increment.

Post-increment.

Functional version of MVar::index().

mnode Meta::MObject::Index_ ( mnode  v,
mnode  x,
mnode  start 
)

Functional version of MVar::index().

mnode Meta::MObject::Index_ ( mnode  v,
mnode  x,
mnode  start,
mnode  end 
)

Functional version of MVar::index().

Functional version of MVar::indexMap().

Info embeds information in M code which is ignored by the interpreter.

virtual bool Meta::MObject::instanceOf ( ClassIdType  classId) const [virtual]
Returns:
true if this object is an instance of the specified class id. A unique class id may be assigned with MFactory::allocateClassId();

Reimplemented from Meta::MObjectBase.

Reimplemented in Meta::MMLEntity.

Functional version of MVar::intersect().

mnode Meta::MObject::Intersect_ ( mnode  v1,
mnode  v2,
mnode  outer 
)

Functional version of MVar::intersect().

Returns:
v1 and v2 Intersected.

Inverse.

Returns:
true if this object is in the process of a virtual call.

Called on the client-side of a distributed object.

Returns:
true If the object is currently connected to a distributed object.
Returns:
true if n is non-symbolic.

Functional version of MVar::isDefined().

Returns:
true if this a server-side distributed object.

Functional version of MVar::isEmpty().

bool Meta::MObject::isExact ( ) const
Returns:
true if object is currently using exact math.
Returns:
true if n is False proper (as opposed to numeric true).
Returns:
true if n is a function.
bool Meta::MObject::isLocal ( ) const
Returns:
true if the connected client resides on localhost.
Returns:
true if n is numeric.
bool Meta::MObject::isRemote ( ) const
Returns:
true if this a client-side (remote) distributed object.
static bool Meta::MObject::isStandardType ( const mstr type) [static]
Returns:
true if type refers to a standard M type, e.g: "double", "mvar"
bool Meta::MObject::isStrict ( ) const
Returns:
true if this interpreter is running in strict mode.
Returns:
true if n is a string.
Returns:
true if n is a symbol.
Returns:
true if n is True proper (as opposed to numeric true).

Interpolate values in si into string s.

mnode Meta::MObject::Join_ ( mnode  v,
mnode  delimiter 
)

Functional version of MVar::join().

Functional version of MVar::keys().

mnode Meta::MObject::Lambda_ ( mnode  n1,
mnode  n2,
mnode  n3 
)

Define a lambda function.

mnode Meta::MObject::LE_ ( mnode  v1,
mnode  v2 
)

Less than or equal to.

Return the length/size of n.

Functional version of MMath::listRange().

Functional version of MMath::listRange().

mnode Meta::MObject::ListRange_ ( mnode  start,
mnode  end,
mnode  increment 
)

Functional version of MMath::listRange().

Logarithm base e.

Logarithm base 10.

Log, same as Print() but with a newline appended.

Use left-recursion to convert n to nested binary functions, e.g: Add(1,2,3) => Add(Add(1,2),3)

mnode Meta::MObject::LRec_ ( mnode  n,
mnode  k,
mnode  all 
)

Use left-recursion to convert n to k-arity nested functions.

mnode Meta::MObject::LT_ ( mnode  v1,
mnode  v2 
)

Less than.

Max value.

Used to specifiy embedded raw M code.

Functional version of MVar::merge().

Merge scopes.

mnode Meta::MObject::method ( const mstr name,
size_t  inputs 
)
Returns:
The M method with the specified signature or mnull on failure.
Returns:
The i-th M method or mnull on failure.
mnode Meta::MObject::Method_ ( mnode  n1,
mnode  n2,
mnode  n3 
)

Declare a method.

size_t Meta::MObject::methodCount ( ) const
Returns:
A count of the number of M methods.
Returns:
All methods in scope.

Resolve a symbol which may be recursively defined.

Min value.

Modulus.

Modulus by, i.e: %=

Multiplication.

Multiply by, i.e: *=

Named argument.

mnode Meta::MObject::NE_ ( mnode  v1,
mnode  v2 
)

Not equal to.

Negation.

Construct a new object.

A no-op, which may be erased from the M code.

Logical negation.

Used to execute a function f once, leaving behind the value as evaluated.

virtual void Meta::MObject::onClientClosed ( const mvar session) [virtual]

Called on the server-side of a distributed object when a connection to client is closed.

Parameters:
sessionThe session data associated with the client.
virtual void Meta::MObject::onServerClosed ( ) [virtual]

Called on the client-side of a distributed object when the connection to server is closed.

mnode Meta::MObject::Or_ ( mnode  n1,
mnode  n2 
)

Logical OR with short-circuiting.

Outer merge scope (s2's symbols/functions take precedence).

std::ostream& Meta::MObject::outputStream ( ) const

Get the output stream.

Typically called when n is a parameter passed to a function to be partially evaluated, e.g: for symbol lookup.

Partial evalation of parameters in f.

A no-op placeholder.

High precision constant pi.

Functional version of MVar::pop().

Functional version of MVar::popBack().

Functional version of MVar::popFront().

Pop a scope from the current call stack.

Exponentiation.

Pre-evaluate functions selectively.

Print.

virtual mnode Meta::MObject::process ( mnode  n,
uint32_t  flags = 0 
) [virtual]

Process method for processing a node through the M interpreter.

Implements Meta::MProcessor.

Reimplemented in Meta::MLib, Meta::MRandom, Meta::MMLEntity, Meta::MMLGrid, Meta::MMLRoot, Meta::MVideoEncoder, Meta::MMage, Meta::MMLSharedVar, and Meta::MDLDomain.

Functional version of MVar::push().

Functional version of MVar::pushBack().

Functional version of MVar::pushFront().

Push scope s onto the current scope stack.

Push scope s onto o's scope stack.

Functional version of MMath::vectorRange().

mnode Meta::MObject::Range_ ( mnode  start,
mnode  end 
)

Functional version of MMath::vectorRange().

mnode Meta::MObject::Range_ ( mnode  start,
mnode  end,
mnode  increment 
)

Functional version of MMath::vectorRange().

Construct a real number.

Redefine a symbol or function. Redefines the first matching symbol or function on the stack.

From the client-side, release a remote object.

mnode Meta::MObject::remoteProcess ( mnode  f,
bool  block = true,
mnode  fail = 0 
)

If this is a remote object (checked through isRemote()) then dispatch a request through a broker to process a method on the server-side of the object.

Parameters:
blockfalse in order to not wait for the response.
failThe node to return upon failure, e.g: if a disconnect occurs during processing.

Replace symbols in f with those mapped in m.

Reset the interpreter, clearing all state.

Reset the global scope and other global state.

Return a value.

Round to nearest integer.

mnode Meta::MObject::Round_ ( mnode  v,
mnode  precision 
)

Round to specfied precision.

Use right-recursion to convert n to nested binary functions, e.g: Add(1,2,3) => Add(1,Add(2,3))

mnode Meta::MObject::RRec_ ( mnode  n,
mnode  k,
mnode  all 
)

Use right-recursion to convert n to k-arity nested functions/

Returns:
The current scope.

Get or create a named scope.

Execute f from within scope s.

Execute f from within a new scope pushed onto the call stack.

Secant.

Hyberbolic secant.

Called on the server-side of a distributed object.

Returns:
The session data associated with this connection.
const mvar& Meta::MObject::session ( ) const

Called on the server-side of a distributed object.

Returns:
The session data associated with the current client's request.

Set n's value to value v.

void Meta::MObject::setAttribute ( const mstr name,
mnode  n,
AttributeMode  mode = Raw 
)

Set the named attribute.

void Meta::MObject::setExact ( bool  flag)

Set whether the interpreter uses exact math rather than returning floating point approximations (in some cases), e.g: an exact interpreter returns Sqrt(2) when Sqrt(2) is requested while non-exact mode would return 1.41421. The initial behavior of the object is to use non-exact math.

void Meta::MObject::setMethod ( mnode  sig,
mnode  body 
)
Returns:
Set an M method.
Parameters:
sige.g: sum(a,b)
bodye.g: Ret(Add(a,b,))
void Meta::MObject::setOutputStream ( std::ostream &  ostr)

Set the output stream used in print, logging, etc. Defaults to MProgram's outputStream.

Set the shared scope object. By default, the shared scope defaults to the global scope.

Set the shared scope to this object.

Set the shared scope of o to s.

void Meta::MObject::setStrict ( bool  flag)

Set whether to enable strict interpretation (default is true). Strict interpreters throw an MProcessError when they attempt to process an undefined symbol or function. Non-strict interpreters leave it untouched, returning the unknown symbol or function.

Show the unevaluated value of a symbol.

Sine.

Hyperboic sine.

Functional version of MVar::size().

mnode Meta::MObject::Split_ ( mnode  v,
mnode  delimiter,
mnode  maxTokens 
)

Functional version of MVar::split().

mnode Meta::MObject::Split_ ( mnode  v,
mnode  delimiter 
)

Functional version of MVar::split().

Square root.

virtual void Meta::MObject::store ( mvar v) const [virtual]

Store this object to v.

Reimplemented from Meta::MObjectBase.

Reimplemented in Meta::MMLEntity, Meta::MMLRoot, Meta::MAuth, Meta::MRandom, Meta::MMage, and Meta::MDLDomain.

Returns:
String str converted to a symbol.

Subtraction.

Subtract from, i.e: -=

Return true if v1's data subsumes v2.

Execute a super-class method.

Returns:
All symbols in scope.
Returns:
Symbol sym converted to a string.

Tangent.

Hyperboic tangent.

Throw an MError with specified message. Node n contains the filename/line number.

mnode Meta::MObject::Throw_ ( mnode  n,
mnode  msg,
mnode  type 
)

Throw an MError with the specified type and message. Node n contains the filename/line number.

Get the i-th scope from the top.

mnode Meta::MObject::Type_ ( mnode  n1,
mnode  n2,
mnode  n3 
)

Construct a type.

mnode Meta::MObject::Type_ ( mnode  n1,
mnode  n2,
mnode  n3,
mnode  n4 
)

Construct a type with initial value.

Undefine n from scope.

Returns:
v1 and v2 United.

Functional version of MVar::unite().

Functional version of MVar::unite().

mnode Meta::MObject::Unite_ ( mnode  v1,
mnode  v2,
mnode  outer 
)

Functional version of MVar::unite().

mnode Meta::MObject::Value_ ( mnode  n1,
mnode  n2,
mnode  n3 
)

Return a typed value.

Construct a variable.

Construct a variable with an initial value.

Set the value of an existing variable or declare a new variable if it does not exist in scope.

While loop.

Logical exclusive-OR with short-circuiting.


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