![]() |
RobWorkProject
23.9.11-
|
Representation of the Mathematica List function. More...
#include <List.hpp>
Inherits Mathematica::FunctionBase.
Public Types | |
| typedef rw::core::Ptr< List > | Ptr |
| Smart pointer type. | |
Public Types inherited from Mathematica::FunctionBase | |
| typedef rw::core::Ptr< FunctionBase > | Ptr |
| Smart pointer type. | |
Public Types inherited from Mathematica::Expression | |
| 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 | |
| List () | |
| Construct empty list. | |
| List (const std::vector< Mathematica::Expression::Ptr > &args) | |
| Construct list from a vector of arguments. More... | |
| List (const std::list< rw::core::Ptr< const Mathematica::Expression >> &args) | |
| Construct list from a list of arguments. More... | |
| template<typename... Exp> | |
| List (const Exp &... expressions) | |
| Construct new list from variable number of arguments. More... | |
| virtual | ~List () |
| Destructor. | |
| virtual std::list< rw::core::Ptr< const Mathematica::Expression > > | getArguments () const |
| Get a list of arguments for this function. More... | |
| virtual Mathematica::Expression::Ptr | clone () const |
| Make a copy of the expression. More... | |
| Mathematica::Expression::Ptr | operator[] (std::size_t i) |
| Get expression at some location in the list. More... | |
| rw::core::Ptr< const Mathematica::Expression > | operator[] (std::size_t i) const |
| Get expression at some location in the list. More... | |
| List & | add (Mathematica::Expression::Ptr expression) |
| Add an expression to list. More... | |
| List & | add (const Mathematica::AutoExpression &expression) |
| Add an expression to list. More... | |
| void | set (std::size_t i, Mathematica::Expression::Ptr expression) |
| Overwrite a specific expression in list. More... | |
Public Member Functions inherited from Mathematica::FunctionBase | |
| 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 List::Ptr | fromExpression (const Mathematica::Expression &exp) |
| Parse a list from a generic expression. More... | |
| template<typename T > | |
| static List::Ptr | toList (const T &vector) |
| Convert a RobWork vector to a Mathematica list. More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from Mathematica::Expression | |
| 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... | |
Protected Attributes inherited from Mathematica::FunctionBase | |
| std::string | _name |
| Name of the function. | |
Representation of the Mathematica List function.
| List | ( | const std::vector< Mathematica::Expression::Ptr > & | args | ) |
Construct list from a vector of arguments.
| args | [in] the vector of arguments |
| List | ( | const std::list< rw::core::Ptr< const Mathematica::Expression >> & | args | ) |
Construct list from a list of arguments.
| args | [in] the list of arguments |
|
inline |
Construct new list from variable number of arguments.
| expressions | [in] the expressions. |
| List& add | ( | const Mathematica::AutoExpression & | expression | ) |
Add an expression to list.
| expression | [in] the expression to add. |
| List& add | ( | Mathematica::Expression::Ptr | expression | ) |
Add an expression to list.
| expression | [in] the expression to add. |
|
virtual |
|
static |
Parse a list from a generic expression.
| exp | [in] the expression to parse. |
|
virtual |
Get a list of arguments for this function.
Implements Mathematica::FunctionBase.
| Mathematica::Expression::Ptr operator[] | ( | std::size_t | i | ) |
Get expression at some location in the list.
| i | [in] the index. |
| rw::core::Ptr<const Mathematica::Expression> operator[] | ( | std::size_t | i | ) | const |
Get expression at some location in the list.
| i | [in] the index. |
| void set | ( | std::size_t | i, |
| Mathematica::Expression::Ptr | expression | ||
| ) |
Overwrite a specific expression in list.
| i | [in] the index. |
| expression | [in] the expression. |
|
inlinestatic |
Convert a RobWork vector to a Mathematica list.
| vector | [in] the vector. |