Types

Scapix generates bindings for functions with supported parameter types and return type. Functions with unsupported types in parameters or return value are ignored.

Supported types:

classes derived from scapix::bridge::object

void
bool
std::int8_t  (char)
std::int16_t (short)
std::int32_t (int)
std::int64_t (long long)
float
double
std::shared_ptr<type>
std::string (UTF-8 encoding)
std::vector<value>
std::map<key,value>
std::set<key>
std::unordered_map<key,value>
std::unordered_set<key>
std::function<type>
  • Supported types may be nested arbitrarily.
  • Classes derived from scapix::bridge::object are bridged by reference and supported in Scapix bindings only when passed as std::shared_ptr<type>.
  • All other types are bridged by copy.
  • Supported type may be passed or returned by value (Type), by const reference (const Type&) or by rvalue reference (Type&&).
  • Non const lvalue reference (Type&) is not supported intentionally.

Example:

#include <scapix/bridge/object.h>

class test : public scapix::bridge::object<test>
{
public:

    // these functions are bridged: all parameter and return value types are supported

    void func1(const std::vector<std::shared_ptr<test>>&);
    void func2(std::function<void(std::vector<std::shared_ptr<test>)>);
    std::map<std::string, std::shared_ptr<test>> func3();

    // these functions are not bridged: not all parameter and return value types are supported

    void func10(void*);

};