Add deserialize implementations
This commit is contained in:
parent
8b84fa6afe
commit
7ec625c955
1 changed files with 36 additions and 0 deletions
|
|
@ -67,6 +67,42 @@
|
||||||
[segment type]
|
[segment type]
|
||||||
type))
|
type))
|
||||||
|
|
||||||
|
(defmethod deserialize ::byte
|
||||||
|
[segment _type]
|
||||||
|
(MemoryAccess/getByte segment))
|
||||||
|
|
||||||
|
(defmethod deserialize ::short
|
||||||
|
[segment _type]
|
||||||
|
(MemoryAccess/getShort segment))
|
||||||
|
|
||||||
|
(defmethod deserialize ::int
|
||||||
|
[segment _type]
|
||||||
|
(MemoryAccess/getInt segment))
|
||||||
|
|
||||||
|
(defmethod deserialize ::long
|
||||||
|
[segment _type]
|
||||||
|
(MemoryAccess/getLong segment))
|
||||||
|
|
||||||
|
(defmethod deserialize ::long-long
|
||||||
|
[segment _type]
|
||||||
|
(MemoryAccess/getLong segment))
|
||||||
|
|
||||||
|
(defmethod deserialize ::char
|
||||||
|
[segment _type]
|
||||||
|
(MemoryAccess/getChar segment))
|
||||||
|
|
||||||
|
(defmethod deserialize ::float
|
||||||
|
[segment _type]
|
||||||
|
(MemoryAccess/getFloat segment))
|
||||||
|
|
||||||
|
(defmethod deserialize ::double
|
||||||
|
[segment _type]
|
||||||
|
(MemoryAccess/getDouble segment))
|
||||||
|
|
||||||
|
(defmethod deserialize ::pointer
|
||||||
|
[segment _type]
|
||||||
|
(MemoryAccess/getAddress segment))
|
||||||
|
|
||||||
(defmulti size-of
|
(defmulti size-of
|
||||||
"The size in bytes of the given `type`."
|
"The size in bytes of the given `type`."
|
||||||
(fn [type] type))
|
(fn [type] type))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue