Free Electron
src/data/Scanner.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __data_Scanner_h__
8 #define __data_Scanner_h__
9 
10 namespace fe
11 {
12 namespace data
13 {
14 
15 class t_layout_info
16 {
17  public:
18  t_layout_info(void);
19  int m_id;
20  bool m_sent;
21 };
22 
23 class t_attr_info
24 {
25  public:
26  int m_id;
27  sp<Scope> m_scope;
28 };
29 
30 
31 typedef std::map<sp<Layout>, t_layout_info> t_layout_loinfo;
32 typedef std::map<sp<RecordGroup>, int> t_rg_id;
33 typedef std::map<sp<RecordArray>, int> t_ra_id;
34 typedef std::map<FE_UWORD, int> t_sb_id;
35 typedef std::map<sp<Attribute>, t_attr_info> t_attr_id;
36 typedef Array<sp<Attribute> > t_attr_array;
37 
38 class FE_DL_EXPORT Scanner
39 {
40  public:
41  Scanner(sp<Scope> spScope);
42 virtual ~Scanner(void);
43 
44  protected:
45 virtual void scan(sp<RecordGroup> spRG);
46 virtual void scan(sp<Layout> spLayout);
47 virtual void scan(Record record);
48 virtual void scan(sp<Attribute> spAttribute, sp<Scope> spScope);
49 virtual void scan(sp<RecordArray> spRA);
50 
51 virtual void deepscan(sp<RecordArray> spRA);
52 
53 virtual void setupSBIDs(sp<RecordGroup> spRG);
54 
55  int getID(sp<RecordGroup> spRG);
56  int getID(sp<RecordArray> spRA);
57  protected:
58  t_attr_array m_attrArray;
59  t_layout_loinfo m_layouts;
60  t_rg_id m_rgs;
61  t_ra_id m_ras;
62  t_sb_id m_sbs;
63  t_attr_id m_attrs;
64  Array<I32> m_recordRGID; //* first RG per record_id
65  Array<I32> m_firstRGID; //* first RG per sb_id
66  sp<RecordGroup> m_spScannedRecords;
67  U32 m_nextLayoutID;
68  U32 m_nextRGID;
69  U32 m_nextAttrID;
70  U32 m_sentAttrID;
71  sp<Scope> m_spScope;
72  sp<BaseType> m_spRecordGroupType;
73  sp<BaseType> m_spRecordArrayType;
74  sp<BaseType> m_spRecordType;
75  sp<BaseType> m_spWeakRecordType;
76  sp<BaseType> m_spVoidType;
77 };
78 
79 } /* namespace */
80 } /* namespace */
81 
82 #endif /* __data_Scanner_h__ */
kernel
Definition: namespace.dox:3