Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Functions
core.cpp File Reference
#include <string>
#include "experimental/tskit/bindings/bindings.h"

Go to the source code of this file.

Classes

class  Something
 

Functions

 EMSCRIPTEN_BINDINGS (Core)
 

Function Documentation

◆ EMSCRIPTEN_BINDINGS()

EMSCRIPTEN_BINDINGS ( Core  )

This function does a public thing.

Parameters
inputan ice cream flavor

The Something class is quite something. See SkSomething.h for more.

Returns a Something with the provided name.

Parameters
name

Returns the associated name.

Definition at line 27 of file core.cpp.

27 {
28 TS_PRIVATE_EXPORT("_privateFunction(x: number, y: number): number")
29 function("_privateFunction", optional_override([](int x, int y)->size_t {
30 return x * y;
31 }));
32
33 /**
34 * This function does a public thing.
35 * @param input an ice cream flavor
36 */
37 TS_EXPORT("publicFunction(input: string): void")
38 function("publicFunction", optional_override([](std::string s)->void {
39 printf("Hello %s\n", s.c_str());
40 }));
41
42 /**
43 * The Something class is quite something. See SkSomething.h for more.
44 */
45 class_<Something>("Something")
46 /**
47 * Returns a Something with the provided name.
48 * @param name
49 */
50 TS_EXPORT("new(name: string): Something")
51 .constructor<std::string>()
52 /**
53 * Returns the associated name.
54 */
55 TS_EXPORT("getName(): string")
56 .function("getName", &Something::getName)
57 TS_PRIVATE_EXPORT("setName(name: string): void")
58 .function("_setName", &Something::setName);
59}
#define TS_PRIVATE_EXPORT(ts_code)
Definition bindings.h:44
#define TS_EXPORT(ts_code)
Definition bindings.h:45
struct MyStruct s
Dart_NativeFunction function
Definition fuchsia.cc:51
const char * name
Definition fuchsia.cc:50
double y
double x
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1
Definition ref_ptr.h:256