Empirical
Namespaces | Functions
js_utils.h File Reference

Tools for passing data between C++ and Javascript. More...

#include <map>
#include <string>
#include <typeinfo>
#include "../base/assert.h"
#include "../base/vector.h"
#include "../base/array.h"
#include "init.h"

Go to the source code of this file.

Namespaces

 emp
 If we are in emscripten, make sure to include the header.
 

Functions

std::map< std::string, std::string > emp::get_type_to_string_map ()
 
template<typename C , class = typename C::value_type>
void emp::pass_array_to_javascript (C values)
 
template<std::size_t SIZE, typename T >
void emp::pass_array_to_cpp (emp::array< T, SIZE > &arr, bool recurse=false)
 
template<typename T >
void emp::pass_vector_to_cpp (emp::vector< T > &arr, bool recurse=false)
 Same as pass_array_to_cpp, but lets you store values in a vector instead. More...
 

Detailed Description

Tools for passing data between C++ and Javascript.

Note
This file is part of Empirical, https://github.com/devosoft/Empirical
Date
2015-2018