1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
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 //
9 #ifndef anna_xml_Binary_hpp
10 #define anna_xml_Binary_hpp
12 #include <anna/core/RuntimeException.hpp>
13 #include <anna/core/util/Recycler.hpp>
21 typedef unsigned int Offset;
22 typedef Recycler <std::string> string_pool;
24 struct Addressing { enum _v { Offset8 = 8, Offset16 = 16, Offset32 = 32 }; };
27 Node = 0xff, Attribute = 0xfe, Text = 0xfd, Namespace = 0xfc, NodeWithNamespace = 0xfb, AttributeWithNamespace = 0xfa,
28 TextValue = 0xe0, IntegerValue = 0xe1, LongValue = 0xe2
32 static const char Version = 0x10;
33 static const Offset IndexVersion = 0;
34 static const Offset IndexAddressing = 1;
35 static const Offset IndexBodyBegin = 2;
37 string_pool a_strings;
39 static int sizeOf(const Addressing::_v v) throw() { return v >> 3; }