RobWorkProject  23.9.11-
Public Types | Public Member Functions | Static Protected Member Functions | List of all members
Mathematica::Expression Class Referenceabstract

A representation of a Mathematica expression. More...

#include <Mathematica.hpp>

Inherited by Mathematica::Array< T >, Mathematica::FunctionBase, Mathematica::Integer, Mathematica::Real, Mathematica::String, and Mathematica::Symbol.

Public Types

enum  Type {
  String , Integer , Real , Symbol ,
  Function , Array
}
 Type of expression. More...
 
typedef rw::core::Ptr< ExpressionPtr
 Smart pointer type.
 
typedef enum rwlibs::mathematica::Mathematica::Expression::Type Type
 Type of expression.
 

Public Member Functions

virtual void out (std::ostream &stream) const =0
 Print to output stream. More...
 
virtual Type getType () const =0
 Get the type of expression. More...
 
virtual Expression::Ptr clone () const =0
 Make a copy of the expression. More...
 

Static Protected Member Functions

template<typename Type >
static void toList (std::list< rw::core::Ptr< Type >> &)
 Helper function for extracting a list of arguments when given as a variable number of arguments. More...
 
template<typename Type , typename Exp , typename... T>
static void toList (std::list< rw::core::Ptr< Type >> &list, const Exp &r, T... t)
 Helper function for extracting a list of arguments when given as a variable number of arguments. More...
 

Detailed Description

A representation of a Mathematica expression.

Member Enumeration Documentation

◆ Type

enum Type

Type of expression.

Enumerator
String 

A string primitive.

Integer 

An integer primitive.

Real 

A real primitive.

Symbol 

A symbol primitive.

Function 

A function.

Array 

An array.

Member Function Documentation

◆ clone()

virtual Expression::Ptr clone ( ) const
pure virtual

◆ getType()

virtual Type getType ( ) const
pure virtual

◆ out()

virtual void out ( std::ostream &  stream) const
pure virtual

Print to output stream.

Parameters
stream[in/out] the stream to print to.

Implemented in RawArray< T, Dynamic >, RawArray< T, Dim >, Mathematica::FunctionBase, Mathematica::Symbol, Mathematica::Real, Mathematica::Integer, and Mathematica::String.

◆ toList() [1/2]

static void toList ( std::list< rw::core::Ptr< Type >> &  )
inlinestaticprotected

Helper function for extracting a list of arguments when given as a variable number of arguments.

Note
Only available for C++11

◆ toList() [2/2]

static void toList ( std::list< rw::core::Ptr< Type >> &  list,
const Exp &  r,
T...  t 
)
inlinestaticprotected

Helper function for extracting a list of arguments when given as a variable number of arguments.

Parameters
list[in] the list of arguments.
r[in] the first argument.
t[in] the rest of the arguments (variable number of arguments)
Note
Only available for C++11

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