kastnermario / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Reading data from base64 #121

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have been using yaml-cpp with this patch, and it seems to work correctly.
It is a little bothersome that you should delete read data manually.

Original issue reported on code.google.com by t.hiroya@gmail.com on 15 Sep 2011 at 2:29

Attachments:

GoogleCodeExporter commented 8 years ago
Hi, I implemented the same thing but in a slighty different way. Instead of 
using the _Binary struct I created a new class, BinaryInput, that automatically 
allocates/deletes memory.

The patch refers to release-0.2.7.

Take a look here too https://github.com/nebirhos/yaml-cpp/tree/binary.

Original comment by fradi...@gmail.com on 14 Oct 2011 at 10:22

Attachments:

GoogleCodeExporter commented 8 years ago
OK, will do.

Original comment by jbe...@gmail.com on 13 Jan 2012 at 6:20

GoogleCodeExporter commented 8 years ago
Done, in both the old API (re9d38346de40) and the new API (r2cb6ae1ea7fa). Now, 
`YAML::Binary` is a type that can be read and written, e.g.,

{{{
YAML::Binary b;
node >> b;
}}}

in the old API, and

{{{
YAML::Binary b = node.as<YAML::Binary>();
}}}

in the new.

Original comment by jbe...@gmail.com on 21 Jan 2012 at 8:04