ANNA Suite  2020b
Multipurpose development suite for Telco applications
Binary.hpp
Go to the documentation of this file.
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 #ifndef anna_xml_Binary_hpp
10 #define anna_xml_Binary_hpp
11 
14 
15 namespace anna {
16 
17 namespace xml {
18 
19 class Binary {
20 protected:
21  typedef unsigned int Offset;
23 
24  struct Addressing { enum _v { Offset8 = 8, Offset16 = 16, Offset32 = 32 }; };
25  struct ItemCode {
26  enum _v {
27  Node = 0xff, Attribute = 0xfe, Text = 0xfd, Namespace = 0xfc, NodeWithNamespace = 0xfb, AttributeWithNamespace = 0xfa,
28  TextValue = 0xe0, IntegerValue = 0xe1, LongValue = 0xe2
29  };
30  };
31 
32  static const char Version = 0x10;
33  static const Offset IndexVersion = 0;
34  static const Offset IndexAddressing = 1;
35  static const Offset IndexBodyBegin = 2;
36 
37  string_pool a_strings;
38 
39  static int sizeOf(const Addressing::_v v) { return v >> 3; }
40 };
41 
42 }
43 }
44 
45 #endif
46 
static int sizeOf(const Addressing::_v v)
Definition: Binary.hpp:39
_v
Definition: Binary.hpp:26
_v
Definition: Binary.hpp:24
static const char Version
Definition: Binary.hpp:32
Definition: Node.hpp:56
Definition: Text.hpp:34
string_pool a_strings
Definition: Binary.hpp:37
static const Offset IndexAddressing
Definition: Binary.hpp:34
Definition: Binary.hpp:25
Definition: Namespace.hpp:30
Definition: Attribute.hpp:35
Recycler< std::string > string_pool
Definition: Binary.hpp:22
Definition: Binary.hpp:19
static const Offset IndexVersion
Definition: Binary.hpp:33
unsigned int Offset
Definition: Binary.hpp:21
Definition: app.hpp:12
static const Offset IndexBodyBegin
Definition: Binary.hpp:35
Definition: Binary.hpp:24