blob: ba8335e0ad611453d190933c82793a4c877c8ee9 (
plain)
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
|
// file : xsde/cxx/parser/validating/inheritance-map.hxx
// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC
// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
#ifndef XSDE_CXX_PARSER_VALIDATING_INHERITANCE_MAP_HXX
#define XSDE_CXX_PARSER_VALIDATING_INHERITANCE_MAP_HXX
#include <stddef.h> // size_t
#include <xsde/cxx/config.hxx>
#include <xsde/cxx/ro-string.hxx>
#include <xsde/cxx/hashmap.hxx>
namespace xsde
{
namespace cxx
{
namespace parser
{
namespace validating
{
struct inheritance_map: hashmap
{
inheritance_map (size_t buckets);
void
insert (const char* derived, const char* base);
bool
check (const char* derived, const char* base) const;
};
// Translation unit initializer.
//
struct inheritance_map_init
{
static inheritance_map* map;
static size_t count;
inheritance_map_init ();
~inheritance_map_init ();
};
inline inheritance_map&
inheritance_map_instance ();
// Map entry initializer.
//
struct inheritance_map_entry
{
inheritance_map_entry (const char* derived, const char* base);
};
}
}
}
}
#include <xsde/cxx/parser/validating/inheritance-map.ixx>
#endif // XSDE_CXX_PARSER_VALIDATING_INHERITANCE_MAP_HXX
|