libwreport
2.9
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
wreport
bulletin
dds-printer.h
1
/*
2
* bulletin/dds-printer - Print a DDS using the interpreter
3
*
4
* Copyright (C) 2011 ARPA-SIM <urpsim@smr.arpa.emr.it>
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
*
19
* Author: Enrico Zini <enrico@enricozini.com>
20
*/
21
22
#ifndef WREPORT_BULLETIN_DDS_PRINTER_H
23
#define WREPORT_BULLETIN_DDS_PRINTER_H
24
25
#include <
wreport/bulletin.h
>
26
#include <wreport/bulletin/internals.h>
27
#include <vector>
28
#include <cstdio>
29
30
namespace
wreport {
31
namespace
bulletin {
32
36
class
DDSPrinter
:
public
ConstBaseVisitor
37
{
38
std::vector<Varcode> stack;
39
FILE* out;
40
41
void
print_context(
Varinfo
info,
unsigned
var_pos);
42
void
print_context(
Varcode
code,
unsigned
var_pos);
43
44
public
:
53
DDSPrinter
(
const
Bulletin
& b, FILE* out);
54
virtual
~
DDSPrinter
();
55
56
virtual
void
do_start_subset
(
unsigned
subset_no,
const
Subset
&
current_subset
);
57
virtual
void
do_attr
(
Varinfo
info,
unsigned
var_pos,
Varcode
attr_code);
58
virtual
void
do_var
(
Varinfo
info);
59
virtual
const
Var
&
do_semantic_var
(
Varinfo
info);
60
virtual
const
Var
&
do_bitmap
(
Varcode
code,
Varcode
rep_code,
Varcode
delayed_code,
const
Opcodes
& ops);
61
virtual
void
do_char_data
(
Varcode
code);
62
void
do_associated_field
(
unsigned
bit_count,
unsigned
significance);
63
64
virtual
void
r_replication
(
Varcode
code,
Varcode
delayed_code,
const
Opcodes
& ops);
65
virtual
void
d_group_begin
(
Varcode
code);
66
virtual
void
d_group_end
(
Varcode
code);
67
};
68
69
}
70
}
71
72
#endif
Generated on Wed Oct 23 2013 08:51:49 for libwreport by
1.8.4