Module ecapnp_schema

Schema functions.

Copyright 2013, Andreas Stenius

Authors: Andreas Stenius (kaos@astekk.se).

Description

Schema functions.

This module exports functions for interacting with a compiled schema.

Data Types

lookup_search()

lookup_search() = object() | ref() | pid() | schema_nodes() | schema_node()

Where to search for the type being looked up.

lookup_type()

lookup_type() = type_id() | type_name() | object | schema_node()

The various types that can be looked up.

object()

object() = ecapnp:object()

ref()

ref() = ecapnp:ref()

schema_node()

schema_node() = ecapnp:schema_node()

schema_nodes()

schema_nodes() = ecapnp:schema_nodes()

type_id()

type_id() = ecapnp:type_id()

type_name()

type_name() = ecapnp:type_name()

Function Index

data_size/1Get data size of a struct type.
find_method_by_name/2Find Interface and Method.
get/2
get_ref_kind/1
get_ref_kind/2
lookup/2Find schema node for type.
lookup/3
ptrs_size/1Get pointer count for a struct type.
set_ref_to/2Set reference kind.
size_of/1Query size of a struct type.
size_of/2Lookup struct type and query it's size.
type_of/1Get type of object.

Function Details

data_size/1

data_size(Struct::schema_node()) -> non_neg_integer()

Get data size of a struct type.

find_method_by_name/2

find_method_by_name(MethodName, Schema_node) -> any()

Find Interface and Method.

get/2

get(Type, Schema) -> any()

get_ref_kind/1

get_ref_kind(Struct) -> any()

get_ref_kind/2

get_ref_kind(Type, Ref) -> any()

lookup/2

lookup(N::lookup_type(), Schema::lookup_search()) -> schema_node() | undefined

Find schema node for type.

lookup/3

lookup(Type, Schema, Default) -> any()

ptrs_size/1

ptrs_size(Struct::schema_node()) -> non_neg_integer()

Get pointer count for a struct type.

set_ref_to/2

set_ref_to(Type::lookup_type(), Ref::ref()) -> ref()

Set reference kind.

Lookup struct Type and return an updated ref.

Note: it is only the record that is updated, the change is not committed to the message.

size_of/1

size_of(Node::schema_node()) -> non_neg_integer()

Query size of a struct type.

Will crash with function_clause if Node is not a struct or interface node.

size_of/2

size_of(Type::lookup_type(), Store::lookup_search()) -> non_neg_integer()

Lookup struct type and query it's size.

type_of/1

type_of(Object::object()) -> schema_node()

Get type of object.


Generated by EDoc, May 30 2014, 12:56:29.