diff options
Diffstat (limited to 'src/Structure.cpp')
| -rw-r--r-- | src/Structure.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Structure.cpp b/src/Structure.cpp index f56b0e6..65e5ca8 100644 --- a/src/Structure.cpp +++ b/src/Structure.cpp | |||
| @@ -127,4 +127,17 @@ Structure* Structure::FromBin(const char* bin, uint64_t size) | |||
| 127 | return ImportStruct(root); | 127 | return ImportStruct(root); |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | Structure* Structure::FromMemory(const std::vector<char>& buf, plist_format_t *format) | ||
| 131 | { | ||
| 132 | return Structure::FromMemory(&buf[0], buf.size(), format); | ||
| 133 | } | ||
| 134 | |||
| 135 | Structure* Structure::FromMemory(const char* buf, uint64_t size, plist_format_t *format) | ||
| 136 | { | ||
| 137 | plist_t root = NULL; | ||
| 138 | plist_from_memory(buf, size, &root, format); | ||
| 139 | return ImportStruct(root); | ||
| 140 | } | ||
| 141 | |||
| 142 | |||
| 130 | } // namespace PList | 143 | } // namespace PList |
