![]() |
RobWorkProject
25.2.11-
|
Representation of a Mathematica Rule. More...
#include <Rule.hpp>
Inherits Mathematica::FunctionBase.
Public Types | |
typedef rw::core::Ptr< Rule > | Ptr |
Smart pointer type. | |
![]() | |
typedef rw::core::Ptr< FunctionBase > | Ptr |
Smart pointer type. | |
![]() | |
enum | Type { String , Integer , Real , Symbol , Function , Array } |
Type of expression. More... | |
typedef rw::core::Ptr< Expression > | Ptr |
Smart pointer type. | |
typedef enum rwlibs::mathematica::Mathematica::Expression::Type | Type |
Type of expression. | |
Public Member Functions | |
Rule (const Mathematica::Symbol &name, const Mathematica::AutoExpression &value) | |
Construct a new Rule expression. More... | |
Rule (const rw::core::PropertyBase &property) | |
Construct a Mathematica Rule based on RobWork property. More... | |
virtual | ~Rule () |
Destructor. | |
std::list< rw::core::Ptr< const Mathematica::Expression > > | getArguments () const |
Get a list of arguments for this function. More... | |
Mathematica::Expression::Ptr | clone () const |
Make a copy of the expression. More... | |
std::string | getId () const |
Get the symbol name of the rule. More... | |
void | setValue (const Mathematica::Expression &value) |
Set the value of the rule. More... | |
![]() | |
FunctionBase (const std::string &name) | |
Construct new function. More... | |
std::string | getName () const |
Get the name of the function. More... | |
Type | getType () const |
Get the type of expression. More... | |
virtual void | out (std::ostream &stream) const |
Print to output stream. More... | |
virtual void | out (std::ostream &stream, std::size_t indent) const |
Print function by using indentations. More... | |
Static Public Member Functions | |
static std::list< Rule::Ptr > | toRules (const rw::core::PropertyMap &options) |
Convert a PropertyMap to a list of Mathematica rules. More... | |
static rw::core::Ptr< rw::core::PropertyMap > | toPropertyMap (const std::list< rw::core::Ptr< const Mathematica::Expression >> &rules) |
Construct PropertyMap from existing expression. More... | |
static rw::core::Ptr< rw::core::PropertyBase > | toProperty (const Mathematica::Expression &rule) |
Convert a Mathematica rule expression to a Property. More... | |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
std::string | _name |
Name of the function. | |
Representation of a Mathematica Rule.
Rule | ( | const Mathematica::Symbol & | name, |
const Mathematica::AutoExpression & | value | ||
) |
Construct a new Rule expression.
name | [in] the name of the rule. |
value | [in] the value of the rule. |
Rule | ( | const rw::core::PropertyBase & | property | ) |
Construct a Mathematica Rule based on RobWork property.
property | [in] the property. |
|
virtual |
|
virtual |
Get a list of arguments for this function.
Implements Mathematica::FunctionBase.
std::string getId | ( | ) | const |
Get the symbol name of the rule.
void setValue | ( | const Mathematica::Expression & | value | ) |
Set the value of the rule.
value | [in] new value. |
|
static |
Convert a Mathematica rule expression to a Property.
rule | [in] the rule expression. |
|
static |
Construct PropertyMap from existing expression.
rules | [in] the expressions to parse as Rules. |
rw::core::Exception | if parsing fails. |
|
static |
Convert a PropertyMap to a list of Mathematica rules.
options | [in] the map with options. |
rw::core::Exception | if a property not supported. |