Remove dynamic exceptions
[anna.git] / source / xml / Decompressor.cpp
1 // ANNA - Anna is Not Nothingness Anymore                                                         //
2 //                                                                                                //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
4 //                                                                                                //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite                           //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7
8
9 #include <arpa/inet.h>
10
11 #include <anna/xml/Decompressor.hpp>
12 #include <anna/xml/DocumentMemory.hpp>
13
14 using namespace std;
15 using namespace anna;
16
17 xml::Decompressor::Decompressor() {
18   a_document = new xml::DocumentMemory;
19 }
20
21 /*virtual*/
22 xml::Decompressor::~Decompressor() {
23   delete a_document;
24 }
25
26 const xml::Document& xml::Decompressor::apply(const DataBlock& zdata)
27 noexcept(false) {
28   const DataBlock& contain = ZBlock::uncompress(zdata);
29   a_document->initialize(contain);
30   return *a_document;
31 }
32