Free Electron
Cloner.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_Cloner_h__
8 #define __data_Cloner_h__
9 
10 namespace fe
11 {
12 
13 /** Deep cloning tool
14  */
15 class FE_DL_EXPORT Cloner : public fe::data::Scanner
16 {
17  public:
18  Cloner(sp<Scope> spScope);
19 virtual ~Cloner(void);
20 
21  Record clone(Record r_src);
22  sp<RecordGroup> clone(sp<RecordGroup> rg_src);
23  sp<RecordGroup> cloneShallow(sp<RecordGroup> rg_src);
24 
25  private:
26  void deepclone(void);
27 
28  std::map< int, sp<RecordGroup> > m_new_rgs;
29  std::map< int, sp<RecordArray> > m_new_ras;
30 
31  void handleRecord(Record r_src);
32 
33 
34  struct RecordWiringInfo
35  {
36  Record m_record;
37  Accessor<Record> m_aRecord;
38  FE_UWORD m_idr;
39  };
40  typedef std::list<RecordWiringInfo> t_wiring;
41 
42  struct WeakRecordWiringInfo
43  {
44  Record m_record;
45  Accessor<WeakRecord> m_aRecord;
46  FE_UWORD m_idr;
47  };
48  typedef std::list<WeakRecordWiringInfo> t_wk_wiring;
49 
50  t_wiring m_wiringList;
51  t_wk_wiring m_wkWiringList;
52  std::map< FE_UWORD, Record> m_src_idr_to_dst_record;
53 };
54 
55 
56 
57 } /* namespace */
58 
59 #endif /* __data_Cloner_h__ */
Deep cloning tool.
Definition: Cloner.h:15
kernel
Definition: namespace.dox:3
The main data access class for the data system.
Definition: Accessor.h:128
Reference to an instance of a Layout.
Definition: RecordSB.h:35