/usr/include/wreport/bulletin/internals.h is in libwreport-dev 3.6-1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | #ifndef WREPORT_BULLETIN_INTERNALS_H
#define WREPORT_BULLETIN_INTERNALS_H
#include <wreport/varinfo.h>
#include <wreport/opcodes.h>
#include <wreport/bulletin/interpreter.h>
#include <vector>
#include <memory>
#include <cmath>
namespace wreport {
struct Var;
struct Subset;
struct Bulletin;
namespace bulletin {
/**
* Base Interpreter specialisation for message encoders that works on a
* subset at a time
*/
struct UncompressedEncoder : public bulletin::Interpreter
{
/// Current subset (used to refer to past variables)
const Subset& current_subset;
/// Index of the next variable to be visited
unsigned current_var = 0;
UncompressedEncoder(const Bulletin& bulletin, unsigned subset_no);
virtual ~UncompressedEncoder();
/// Get the next variable, without incrementing current_var
const Var& peek_var();
/// Get the next variable, incrementing current_var by 1
const Var& get_var();
/// Get the variable at the given position
const Var& get_var(unsigned pos) const;
void define_bitmap(unsigned bitmap_size) override;
void define_variable(Varinfo info) override;
unsigned define_delayed_replication_factor(Varinfo info) override;
unsigned define_associated_field_significance(Varinfo info) override;
unsigned define_bitmap_delayed_replication_factor(Varinfo info) override;
/**
* Encode a variable.
*
* By default, this raises error_unimplemented. For decoders that encode
* normal variables, delayed replication factors, bitmap delayed
* replication factors, and associated field significances in the same way,
* can just override this method and use the default define_*
* implementations.
*/
virtual void encode_var(Varinfo info, const Var& var);
/**
* Encode an attribute for an associated field.
*
* Var is the variable that the associated field refers to. The actual
* value of the associated field can be looked up using the functions in
* this->associated_field.
*/
virtual void encode_associated_field(const Var& var);
};
struct UncompressedDecoder : public bulletin::Interpreter
{
/// Subset where decoded variables go
Subset& output_subset;
UncompressedDecoder(Bulletin& bulletin, unsigned subset_no);
~UncompressedDecoder();
};
struct CompressedDecoder : public bulletin::Interpreter
{
Bulletin& output_bulletin;
CompressedDecoder(Bulletin& bulletin);
virtual ~CompressedDecoder();
};
}
}
#endif
|