Marsyas  0.6.0-alpha
Data Structures | Namespaces | Defines
/usr/src/RPM/BUILD/marsyas-0.6.0/src/marsyas/expr/ExVal.h File Reference
#include <marsyas/sched/TmTimer.h>
#include <marsyas/sched/Scheduler.h>
#include <marsyas/common_header.h>
#include <string>
#include <iostream>
#include <cmath>

Go to the source code of this file.

Data Structures

class  ExVal
 ExVal is the abstract value type for expression tree nodes. Every expression results in a ExVal of the basic types: string, natural, real, bool. More...
class  ExValTyped

Namespaces

namespace  Marsyas

Defines

#define B_BOP(_OP, _CAST)   T_BINOP("mrs_bool",bool_,_OP,_CAST)
#define LIST_CONCAT   if (v1.is_list()&&v2.is_list()) { return v1.append(v2); }
#define N_BOP(_OP, _CAST)   T_BINOP("mrs_natural",natural_,_OP,_CAST)
#define R_BOP(_OP, _CAST)   T_BINOP("mrs_real",real_,_OP,_CAST)
#define RMOD_BOP()   if (v1.type_=="mrs_real") { return fmod(v1.real_,v2.real_); }
#define S_BOP(_OP, _CAST)   T_BINOP("mrs_string",string_,_OP,_CAST)
#define T_BINOP(_T, _VAL, _OP, _CAST)   if (v1.type_==_T) { return _CAST(v1._VAL _OP v2._VAL); }
#define VAL_BINOP(_NAME, _WARN, _TESTS)

Define Documentation

#define B_BOP (   _OP,
  _CAST 
)    T_BINOP("mrs_bool",bool_,_OP,_CAST)

Definition at line 119 of file ExVal.h.

#define LIST_CONCAT   if (v1.is_list()&&v2.is_list()) { return v1.append(v2); }

Definition at line 111 of file ExVal.h.

#define N_BOP (   _OP,
  _CAST 
)    T_BINOP("mrs_natural",natural_,_OP,_CAST)

Definition at line 116 of file ExVal.h.

#define R_BOP (   _OP,
  _CAST 
)    T_BINOP("mrs_real",real_,_OP,_CAST)

Definition at line 117 of file ExVal.h.

#define RMOD_BOP ( )    if (v1.type_=="mrs_real") { return fmod(v1.real_,v2.real_); }

Definition at line 118 of file ExVal.h.

#define S_BOP (   _OP,
  _CAST 
)    T_BINOP("mrs_string",string_,_OP,_CAST)

Definition at line 115 of file ExVal.h.

#define T_BINOP (   _T,
  _VAL,
  _OP,
  _CAST 
)    if (v1.type_==_T) { return _CAST(v1._VAL _OP v2._VAL); }

Definition at line 114 of file ExVal.h.

#define VAL_BINOP (   _NAME,
  _WARN,
  _TESTS 
)
Value:
friend inline ExVal _NAME(const ExVal& v1, const ExVal& v2)     \
        {                                                               \
            _TESTS;                                                     \
            ((std::string)_WARN+"  Invalid types ~"+v1.getType()+","+v2.getType()); \
            return v1;                                                  \
        };

Definition at line 125 of file ExVal.h.