1 #ifndef _library__portctrl_parse__hpp__included__
2 #define _library__portctrl_parse__hpp__included__
4 #include "assembler.hpp"
16 struct controller_set
* pcs_from_json(const JSON::node
& root
, const std::string
& ptr
);
17 std::vector
<controller_set
*> pcs_from_json_array(const JSON::node
& root
, const std::string
& ptr
);
18 std::string
pcs_write_class(const struct controller_set
& pset
, unsigned& tmp_idx
);
19 std::string
pcs_write_trailer(const std::vector
<controller_set
*>& p
);
20 std::string
pcs_write_classes(const std::vector
<controller_set
*>& p
, unsigned& tmp_idx
);
22 struct type_generic
: public type
24 type_generic(const JSON::node
& root
, const std::string
& ptr
) throw(std::exception
);
25 ~type_generic() throw();
26 struct ser_instruction
45 std::vector
<size_t> indexbase
;
46 std::vector
<idxinfo
> indexinfo
;
48 mutable std::vector
<ser_instruction
> serialize_instructions
;
49 std::string
port_iname(const JSON::node
& root
, const std::string
& ptr
);
50 std::string
port_hname(const JSON::node
& root
, const std::string
& ptr
);
51 size_t port_size(const JSON::node
& root
, const std::string
& ptr
);
52 static void _write(const type
* _this
, unsigned char* buffer
, unsigned idx
, unsigned ctrl
, short x
);
53 static short _read(const type
* _this
, const unsigned char* buffer
, unsigned idx
, unsigned ctrl
);
54 static size_t _serialize(const type
* _this
, const unsigned char* buffer
, char* textbuf
);
55 static size_t _deserialize(const type
* _this
, unsigned char* buffer
, const char* textbuf
);
56 void make_dynamic_blocks();
57 void make_routines(assembler::assembler
& a
, assembler::label_list
& labels
);