tudocomp
– The TU Dortmund Compression Framework
TextDSFlags.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <tudocomp/util.hpp>
5 
6 namespace tdc {
7 namespace ds {
8  using dsflags_t = unsigned int;
9 
10  constexpr dsflags_t NONE = 0x00;
11  constexpr dsflags_t SA = 0x01;
12  constexpr dsflags_t ISA = 0x02;
13  constexpr dsflags_t LCP = 0x04;
14  constexpr dsflags_t PHI = 0x08;
15  constexpr dsflags_t PLCP = 0x10;
16 
18 
20  dsflags_t m_flags;
21  public:
24  InputRestrictions(other),
25  m_flags(flags) {}
28 
29  inline const dsflags_t& flags() const {
30  return m_flags;
31  }
32  };
33 
34  inline std::ostream& operator<<(std::ostream& o,
35  const InputRestrictionsAndFlags& v) {
36  o << "{ escape_bytes: " << vec_to_debug_string(v.escape_bytes())
37  << ", null_termination: " << (v.null_terminate() ? "true" : "false")
38  << ", ds_flags: " << v.flags()
39  << " }";
40  return o;
41  }
42 }
43 }
Contains the text compression and encoding framework.
Definition: namespaces.hpp:11
constexpr dsflags_t NONE
Definition: TextDSFlags.hpp:10
std::string vec_to_debug_string(const T &s, size_t indent=0)
Builds the string representation of a vector of byte values, sorrounded by square brackets ([ and ])...
std::ostream & operator<<(std::ostream &o, const InputRestrictionsAndFlags &v)
Definition: TextDSFlags.hpp:34
constexpr dsflags_t PHI
Definition: TextDSFlags.hpp:14
unsigned int dsflags_t
Definition: TextDSFlags.hpp:8
constexpr dsflags_t ISA
Definition: TextDSFlags.hpp:12
Describes a set of restrictions placed on input data.
constexpr dsflags_t PLCP
Definition: TextDSFlags.hpp:15
const std::vector< uint8_t > & escape_bytes() const
const dsflags_t & flags() const
Definition: TextDSFlags.hpp:29
constexpr dsflags_t SA
Definition: TextDSFlags.hpp:11
InputRestrictionsAndFlags(const InputRestrictions &other, dsflags_t flags)
Definition: TextDSFlags.hpp:22
constexpr dsflags_t LCP
Definition: TextDSFlags.hpp:13