Orxonox: Tcl::interpreter Class Reference

# Tcl::interpreter Class Reference

`#include <src/cpptcl/cpptcl.h>`

List of all members.

## Public Member Functions

template<class C>
details::class_definer< C > | class_ (std::string const &name, details::no_init_type const &)
template<class C, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
details::class_definer< C > | class_ (std::string const &name, init< T1, T2, T3, T4, T5, T6, T7, T8, T9 > const &, policies const &p=policies())
template<class C>
details::class_definer< C > | class_ (std::string const &name)
void | create_alias (std::string const &cmd, interpreter &targetInterp, std::string const &targetCmd)
template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
void | def (std::string const &name, R(*f)(T1, T2, T3, T4, T5, T6, T7, T8, T9), policies const &p=policies())
template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
void | def (std::string const &name, R(*f)(T1, T2, T3, T4, T5, T6, T7, T8), policies const &p=policies())
template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
void | def (std::string const &name, R(*f)(T1, T2, T3, T4, T5, T6, T7), policies const &p=policies())
template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
void | def (std::string const &name, R(*f)(T1, T2, T3, T4, T5, T6), policies const &p=policies())
template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5>
void | def (std::string const &name, R(*f)(T1, T2, T3, T4, T5), policies const &p=policies())
template<typename R, typename T1, typename T2, typename T3, typename T4>
void | def (std::string const &name, R(*f)(T1, T2, T3, T4), policies const &p=policies())
template<typename R, typename T1, typename T2, typename T3>
void | def (std::string const &name, R(*f)(T1, T2, T3), policies const &p=policies())
template<typename R, typename T1, typename T2>
void | def (std::string const &name, R(*f)(T1, T2), policies const &p=policies())
template<typename R, typename T1>
void | def (std::string const &name, R(*f)(T1), policies const &p=policies())
template<typename R>
void | def (std::string const &name, R(*f)(), policies const &p=policies())
template<class InputIterator>
details::result | eval (InputIterator first, InputIterator last)
details::result | eval (object const &o)
details::result | eval (std::istream &s)
details::result | eval (std::string const &script)
Tcl_Interp * | get () const
| interpreter (Tcl_Interp *, bool owner=true)
| interpreter (std::string const &libpath)
| interpreter ()
void | make_safe ()
void | pkg_provide (std::string const &name, std::string const &version)
| ~interpreter ()

## Static Public Member Functions

static void | clear_definitions (Tcl_Interp *)

## Private Member Functions

void | add_class (std::string const &name, boost::shared_ptr< details::class_handler_base > chb)
void | add_constructor (std::string const &name, boost::shared_ptr< details::class_handler_base > chb, boost::shared_ptr< details::callback_base > cb, policies const &p=policies())
void | add_function (std::string const &name, boost::shared_ptr< details::callback_base > cb, policies const &p=policies())
| interpreter (const interpreter &)
void | operator= (const interpreter &)

## Private Attributes

Tcl_Interp * | interp_
bool | owner_

## Constructor & Destructor Documentation

interpreter::interpreter | ( |  | ) |

References interp_, and owner_.

interpreter::interpreter | ( | std::string const & | libpath | ) |

References eval(), interp_, and owner_.

interpreter::interpreter | ( | Tcl_Interp * | interp,
|  | bool | owner = `true` |
| ) |  |  |

References interp_, and owner_.

interpreter::~interpreter | ( |  | ) |

References clear_definitions(), interp_, and owner_.

Tcl::interpreter::interpreter | ( | const interpreter & |  | ) | `[private]`

## Member Function Documentation

void Tcl::interpreter::add_class | ( | std::string const & | name,
|  | boost::shared_ptr< details::class_handler_base > | chb |
| ) |  |  | `[private]`

Referenced by Tcl::details::callback1< R, T1 >::invoke().

void Tcl::interpreter::add_constructor | ( | std::string const & | name,
|  | boost::shared_ptr< details::class_handler_base > | chb,
|  | boost::shared_ptr< details::callback_base > | cb,
|  | policies const & | p = `policies()` |
| ) |  |  | `[private]`

Referenced by Tcl::details::callback1< R, T1 >::invoke().

void Tcl::interpreter::add_function | ( | std::string const & | name,
|  | boost::shared_ptr< details::callback_base > | cb,
|  | policies const & | p = `policies()` |
| ) |  |  | `[private]`

Referenced by Tcl::details::construct< C, T1, T2, void, void, void, void, void, void, void >::doit(), Tcl::details::construct< C, T1, T2, T3, T4, T5, void, void, void, void >::doit(), Tcl::details::construct< C, T1, T2, T3, T4, T5, T6, void, void, void >::doit(), and Tcl::details::construct< C, T1, T2, T3, T4, T5, T6, T7, void, void >::doit().

template<class C>

details::class_definer<C> Tcl::interpreter::class_ | ( | std::string const & | name,
|  | details::no_init_type const & |  |
| ) |  |  | `[inline]`

template<class C, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>

details::class_definer<C> Tcl::interpreter::class_ | ( | std::string const & | name,
|  | init< T1, T2, T3, T4, T5, T6, T7, T8, T9 > const & | ,
|  | policies const & | p = `policies()` |
| ) |  |  | `[inline]`

template<class C>

details::class_definer<C> Tcl::interpreter::class_ | ( | std::string const & | name | ) | `[inline]`

void interpreter::clear_definitions | ( | Tcl_Interp * | interp | ) | `[static]`

References call_policies, callbacks, class_handlers, and constructors.

Referenced by ~interpreter().

void interpreter::create_alias | ( | std::string const & | cmd,
|  | interpreter & | targetInterp,
|  | std::string const & | targetCmd |
| ) |  |  |

References interp_.

template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>

void Tcl::interpreter::def | ( | std::string const & | name,
|  | R(*)(T1, T2, T3, T4, T5, T6, T7, T8, T9) | f,
|  | policies const & | p = `policies()` |
| ) |  |  | `[inline]`

template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>

void Tcl::interpreter::def | ( | std::string const & | name,
|  | R(*)(T1, T2, T3, T4, T5, T6, T7, T8) | f,
|  | policies const & | p = `policies()` |
| ) |  |  | `[inline]`

template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>

void Tcl::interpreter::def | ( | std::string const & | name,
|  | R(*)(T1, T2, T3, T4, T5, T6, T7) | f,
|  | policies const & | p = `policies()` |
| ) |  |  | `[inline]`

template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>

void Tcl::interpreter::def | ( | std::string const & | name,
|  | R(*)(T1, T2, T3, T4, T5, T6) | f,
|  | policies const & | p = `policies()` |
| ) |  |  | `[inline]`

template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5>

void Tcl::interpreter::def | ( | std::string const & | name,
|  | R(*)(T1, T2, T3, T4, T5) | f,
|  | policies const & | p = `policies()` |
| ) |  |  | `[inline]`

template<typename R, typename T1, typename T2, typename T3, typename T4>

void Tcl::interpreter::def | ( | std::string const & | name,
|  | R(*)(T1, T2, T3, T4) | f,
|  | policies const & | p = `policies()` |
| ) |  |  | `[inline]`

template<typename R, typename T1, typename T2, typename T3>

void Tcl::interpreter::def | ( | std::string const & | name,
|  | R(*)(T1, T2, T3) | f,
|  | policies const & | p = `policies()` |
| ) |  |  | `[inline]`

template<typename R, typename T1, typename T2>

void Tcl::interpreter::def | ( | std::string const & | name,
|  | R(*)(T1, T2) | f,
|  | policies const & | p = `policies()` |
| ) |  |  | `[inline]`

template<typename R, typename T1>

void Tcl::interpreter::def | ( | std::string const & | name,
|  | R(*)(T1) | f,
|  | policies const & | p = `policies()` |
| ) |  |  | `[inline]`

template<typename R>

void Tcl::interpreter::def | ( | std::string const & | name,
|  | R(*)() | f,
|  | policies const & | p = `policies()` |
| ) |  |  | `[inline]`

Referenced by orxonox::TclThreadManager::createNewTclInterpreter(), orxonox::TclBind::createTclInterpreter(), and orxonox::IRC::initialize().

template<class InputIterator>

details::result Tcl::interpreter::eval | ( | InputIterator | first,
|  | InputIterator | last |
| ) |  |  | `[inline]`

result interpreter::eval | ( | object const & | o | ) |

References Tcl::object::get_object(), and interp_.

details::result Tcl::interpreter::eval | ( | std::istream & | s | ) |

result interpreter::eval | ( | std::string const & | script | ) |

References interp_.

Referenced by orxonox::TclThreadManager::createNewTclInterpreter(), orxonox::TclBind::createTclInterpreter(), orxonox::TclBind::eval(), orxonox::IRC::eval(), orxonox::TclThreadManager::evalQuery(), interpreter(), orxonox::TclBind::tcl(), and orxonox::tclThread().

Tcl_Interp* Tcl::interpreter::get | ( |  | ) | const`[inline]`

Referenced by Tcl::object::append(), Tcl::object::append_list(), Tcl::object::at(), Tcl::object::length(), Tcl::object::replace(), and Tcl::object::replace_list().

void interpreter::make_safe | ( |  | ) |

References interp_.

void Tcl::interpreter::operator= | ( | const interpreter & |  | ) | `[private]`

void interpreter::pkg_provide | ( | std::string const & | name,
|  | std::string const & | version |
| ) |  |  |

References interp_.

## Member Data Documentation

Tcl_Interp* Tcl::interpreter::interp_`[private]`

Referenced by create_alias(), eval(), interpreter(), make_safe(), pkg_provide(), and ~interpreter().

bool Tcl::interpreter::owner_`[private]`

Referenced by interpreter(), and ~interpreter().

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

- src/cpptcl/cpptcl.h
- src/cpptcl/cpptcl.cc