1#ifndef _singthread_lintree_h
2#define _singthread_lintree_h
17extern std::vector<LinTreeEncodeFunc>
encoders;
18extern std::vector<LinTreeDecodeFunc>
decoders;
50 memcpy(&
result, memory.c_str() + cursor,
sizeof(
T));
57 memcpy(&
result, memory.c_str() + cursor -
sizeof(
T),
sizeof(
T));
62 memory.append((
const char *) &data,
sizeof(
T));
81 const char *
result = memory.c_str() + cursor;
86 return memory.c_str() + cursor;
92 size_t pos = memory.size();
94 for (
size_t i = 0;
i < n;
i++) {
97 return (
char *)(memory.c_str() + pos);
100 size_t n = strlen(
p);
105 size_t n = get_size();
106 const char *
result = memory.c_str() + cursor;
111 size_t n = get_size();
120 void set_last_ring(
void *r);
122 return last_ring !=
NULL;
void put_bytes(char *p, size_t n)
std::string & to_string()
void skip_bytes(size_t n)
void put_cstring(char *p)
char * reserve_bytes(size_t n)
const char * get_bytes(size_t n)
void mark_error(const char *s)
const char * get_cstring()
Class used for (list of) interpreter objects.
const CanonicalForm int s
vector< LinTreeDecodeFunc > decoders
void(* LinTreeRefFunc)(LinTree &lintree, int by)
std::string to_string(leftv val)
leftv(* LinTreeDecodeFunc)(LinTree &lintree)
vector< LinTreeRefFunc > refupdaters
vector< LinTreeEncodeFunc > encoders
void install(int typ, LinTreeEncodeFunc enc, LinTreeDecodeFunc dec, LinTreeRefFunc ref)
leftv from_string(std::string &str)
void(* LinTreeEncodeFunc)(LinTree &lintree, leftv val)