Commit Graph

12 Commits

Author SHA1 Message Date
Katelyn Baker
8f7346f84c
NOTICK - Add C++ Serialiser Support for Maps and Arrays (#5775)
Adds support for understanding both Maps and Arrays

Irritatingly, whilst arrays are mostly serialized as lists, we cannot simply use a restricted List reader to deserialize them because there are subtle differences in the way we need to work out if its actually a restricted type or not. Rather than add a bunch of random logic into the factory method I've isolated it in the class hierarchy. So a little bit more code makes the implementations a lot neater. We also need to deal with the fact arras of unboxed primitives exist, which whilst Java really gets excited about, we don't need to care about. An int, is an int, is an int!.

Map support required we add a slightly better Value dumper, essentially the "key" component of the KV pair needs to be more flexible than a simple string when we're dumping out param:value pairs.

Testing
Added a lot more unit tests to both the ordered type notation code to ensure we build up the schema dependency struct in the correct order. Quite important as we rely on that in the composite factory to be strictly ordered to ensure we're not constructing a reader for a type we don't yet understand... and there were some small bugs in the version that predates this PR

Also added a lot higher level tests to ensure actual reading out of the blob works
2019-12-13 00:32:25 +00:00
Katelyn Baker
0d7c10a846 NOTICK - fix cpp serialiser under linux (#5801) 2019-12-11 10:35:45 +00:00
Katelyn Baker
c349ff719d
NOTICK - Add ENUM to the C++ serialiser (#5616) 2019-11-19 16:00:11 +00:00
Katelyn Baker
7b308eb45f
NOTICK: Add BlobWriter and Schema Dumper
The Blob Writer is a small kotlin app that allows arbitrary things to be serialized and then those bytes written to a file, quite useful for working on non JVM parsing of such things.

Along a similar vein, add a schema dumper alongside the blob-inspector to highlight the contents of the header
2019-08-26 20:59:56 +01:00
Katelyn Baker
171c2be2db NOTICK - Typo in comment 2019-08-19 22:40:10 +01:00
Katelyn Baker
19adbffffb NOTICK - Break up the Property Reader Class into multiple files
As having them all live in a single PropertyReader header / source
file was getting far too big. Additionally, sue some of our aliased
types to shorted lines (sVec, sList, uPtr etc)
2019-08-19 22:37:22 +01:00
Katelyn Baker
eb8eaba1d7 NOTICK - Fix namespace allocation for C++ Serialiser
Now things are working for the most part, move the readers into their
own internal namespace. Also start creating an actual separation of the
interface and the implementation with some Interface classes at the
non internal level.
2019-08-19 20:13:04 +01:00
Katelyn Baker
81e9e8a842 NOTICK - Small tidy up based on lint suggestions
Move functions into .cxx files and out of the inline implementation in
the headers, std::move constructor params.
2019-08-17 16:19:02 +01:00
Katelyn Baker
3c3f5f5e04 NOTICK - Move CompositeFactory into amqp::internal namespace 2019-08-17 16:11:58 +01:00
Katelyn Baker
2ba8676013 NOTICK - Remove commented out code 2019-08-17 09:53:08 +01:00
Katelyn Baker
cfa657a1a0 NOTICK - CPP project gitignore 2019-08-16 12:58:23 +01:00
Katelyn Baker
913ba1d46e
NOTICK - Initial work on a non JVM (C++) serialiser (#5368)
Currently, it's more of a blob inspector than a full-blown
implementation, but this code does have the ability to understand a Corda
serialized blob and build a set of deserialisers to handle a blob. It
does this in the same way the native java implementation works by
interrogating the types (as per the definition in the envelope) and
building recursive type readers that are able to pull the relevant
information out of the byte stream.

Lots of future work to undertake, but as a starting point its a little
bit useful with the scope it could be made much more useful with some
work.
2019-08-15 21:16:20 +01:00