Delegator.h Source File#
Delegator.h
Go to the documentation of this file.
Header for unit conversion utilities, which are used to translate user input from input files (See In...
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:427
Base class for exceptions thrown by Cantera classes.
Definition ctexceptions.h:66
Delegate member functions of a C++ class to externally-specified functions.
Definition Delegator.h:104
void install(const string &name, function< void(double)> &target, const function< void(double)> &func)
Install a function with the signature void(double) as being delegatable.
Definition Delegator.h:317
function< ReturnType(Args ...)> makeDelegate(const string &name, const function< int(ReturnType &, Args ...)> &func, const string &when, const function< ReturnType(Args ...)> &base)
Create a delegate for a function with a return value.
Definition Delegator.h:447
void setDelegate(const string &name, const function< void(const AnyMap &, const UnitStack &)> &func, const string &when)
set delegates for member functions with the signature void(AnyMap&, UnitStack&)
Definition Delegator.h:162
void setDelegate(const string &name, const function< int(string &, size_t)> &func, const string &when)
Set delegates for member functions with the signature string(size_t)
Definition Delegator.h:257
void setDelegate(const string &name, const function< void(bool)> &func, const string &when)
set delegates for member functions with the signature void(bool)
Definition Delegator.h:128
void install(const string &name, function< void(bool)> &target, const function< void(bool)> &func)
Install a function with the signature void(bool) as being delegatable.
Definition Delegator.h:309
void install(const string &name, function< void(std::array< size_t, 3 >, double *, double *, double *)> &target, const function< void(std::array< size_t, 3 >, double *, double *, double *)> &base)
Install a function with the signature void(double*, double*, double*) as being delegatable.
Definition Delegator.h:381
void holdExternalHandle(const string &name, const shared_ptr< ExternalHandle > &handle)
Store a handle to a wrapper for the delegate from an external language interface.
Definition Delegator.h:283
string delegatorName() const
Get the name of the user-defined class in the extension language.
Definition Delegator.h:107
void install(const string &name, function< void(AnyMap &)> &target, const function< void(AnyMap &)> &func)
Install a function with the signature void(AnyMap&) as being delegatable.
Definition Delegator.h:325
void setDelegate(const string &name, const function< void(double)> &func, const string &when)
set delegates for member functions with the signature void(double)
Definition Delegator.h:139
void setDelegate(const string &name, const function< void(std::array< size_t, 1 >, double, double *)> &func, const string &when)
Set delegates for member functions with the signature void(double, double*)
Definition Delegator.h:201
void setDelegate(const string &name, const function< void(const string &, void *)> &func, const string &when)
set delegates for member functions with the signature void(const string&, void*)
Definition Delegator.h:177
void install(const string &name, function< size_t(const string &)> &target, const function< size_t(const string &)> &base)
Install a function with the signature size_t(string) as being delegatable.
Definition Delegator.h:408
function< void(Args ...)> makeDelegate(const function< void(Args ...)> &func, const string &when, BaseFunc base)
Create a delegate for a function with no return value.
Definition Delegator.h:419
void install(const string &name, function< void(const AnyMap &, const UnitStack &)> &target, const function< void(const AnyMap &, const UnitStack &)> &func)
Install a function with the signature void(const AnyMap&, const UnitStack&) as being delegatable.
Definition Delegator.h:334
void install(const string &name, function< double(void *)> &target, const function< double(void *)> &func)
Install a function with the signature double(void*) as being delegatable.
Definition Delegator.h:390
void setDelegate(const string &name, const function< void(std::array< size_t, 2 >, double, double *, double *)> &func, const string &when)
Set delegates for member functions with the signature void(double, double*, double*)
Definition Delegator.h:216
map< string, shared_ptr< ExternalHandle > > m_handles
Handles to wrappers for the delegated object in external language interfaces.
Definition Delegator.h:550
void setDelegate(const string &name, const function< void(AnyMap &)> &func, const string &when)
set delegates for member functions with the signature void(AnyMap&)
Definition Delegator.h:150
void install(const string &name, function< void()> &target, const function< void()> &func)
Install a function with the signature void() as being delegatable.
Definition Delegator.h:301
void install(const string &name, function< void(std::array< size_t, 1 >, double *)> &target, const function< void(std::array< size_t, 1 >, double *)> &func)
Install a function with the signature void(double*) as being delegatable.
Definition Delegator.h:352
void setDelegate(const string &name, const function< void(std::array< size_t, 1 >, double *)> &func, const string &when)
Set delegates for member functions with the signature void(double*)
Definition Delegator.h:189
void setDelegate(const string &name, const function< int(size_t &, const string &)> &func, const string &when)
Set delegates for member functions with the signature size_t(string)
Definition Delegator.h:270
void setDelegate(const string &name, const function< int(double &, void *)> &func, const string &when)
set delegates for member functions with the signature double(void*)
Definition Delegator.h:245
void install(const string &name, function< void(std::array< size_t, 1 >, double, double *)> &target, const function< void(std::array< size_t, 1 >, double, double *)> &func)
Install a function with the signature void(double, double*) as being delegatable.
Definition Delegator.h:361
void setDelegate(const string &name, const function< void()> &func, const string &when)
Set delegates for member functions with the signature void().
Definition Delegator.h:117
void install(const string &name, function< string(size_t)> &target, const function< string(size_t)> &base)
Install a function with the signature string(size_t) as being delegatable.
Definition Delegator.h:398
void install(const string &name, function< void(std::array< size_t, 2 >, double, double *, double *)> &target, const function< void(std::array< size_t, 2 >, double, double *, double *)> &func)
Install a function with the signature void(double, double*, double*) as being delegatable.
Definition Delegator.h:371
void install(const string &name, function< void(const string &, void *)> &target, const function< void(const string &, void *)> &func)
Install a function with the signature `void(const string&, void*) as being delegatable.
Definition Delegator.h:344
void setDelegatorName(const string &delegatorName)
Set the name of the user-defined class in the extension language.
Definition Delegator.h:112
shared_ptr< ExternalHandle > getExternalHandle(const string &name) const
Get the handle for a wrapper for the delegate from the external language interface specified by name.
Definition Delegator.h:291
void setDelegate(const string &name, const function< void(std::array< size_t, 3 >, double *, double *, double *)> &func, const string &when)
Set delegates for member functions with the signature void(double*, double*, double*)
Definition Delegator.h:231
An error indicating that an unimplemented function has been called.
Definition ctexceptions.h:195
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
string demangle(const std::type_info &type)
Convert a type name to a human readable string, using boost::core::demangle if available.
Definition global.cpp:213
Generated by