Minsky
schema2::Schema1Layout Struct Reference
Collaboration diagram for schema2::Schema1Layout:
Collaboration graph

Public Member Functions

 Schema1Layout (const vector< shared_ptr< schema1::Layout >> &x)
 
template<class V , class O >
void addItem (V &vec, const O &item)
 

Public Attributes

map< int, schema1::UnionLayoutlayout
 

Detailed Description

Definition at line 60 of file schema2.cc.

Constructor & Destructor Documentation

◆ Schema1Layout()

schema2::Schema1Layout::Schema1Layout ( const vector< shared_ptr< schema1::Layout >> &  x)
inline

Definition at line 63 of file schema2.cc.

References layout, and xml_unpack().

63  {
64  for (auto& i: x)
65  {
66  if (auto ul=dynamic_cast<schema1::UnionLayout*>(i.get()))
67  layout[i->id]=*ul;
68  else
69  {
70  // TODO: I don't think this code will ever be executed?
71  // serialise to XML, then deserialise to a UnionLayout
72  ostringstream is;
73  xml_pack_t xmlPackBuf(is);
74  i->xml_pack(xmlPackBuf,"");
75  istringstream os(is.str());
76  xml_unpack_t xmlUnpackBuf(os);
77  xml_unpack(xmlUnpackBuf,"",layout[i->id]);
78  }
79  }
80  }
void xml_unpack(classdesc::xml_unpack_t &, const classdesc::string &, classdesc::ref< ecolab::urand > &)
map< int, schema1::UnionLayout > layout
Definition: schema2.cc:62
Here is the call graph for this function:

Member Function Documentation

◆ addItem()

template<class V , class O >
void schema2::Schema1Layout::addItem ( V &  vec,
const O &  item 
)
inline

Definition at line 82 of file schema2.cc.

References layout.

Referenced by schema2::Minsky::Minsky().

82  {
83  vec.emplace_back(item);
84  if (layout.contains(item.id))
85  vec.back().addLayout(layout[item.id]);
86  }
map< int, schema1::UnionLayout > layout
Definition: schema2.cc:62
Here is the caller graph for this function:

Member Data Documentation

◆ layout

map<int,schema1::UnionLayout> schema2::Schema1Layout::layout

Definition at line 62 of file schema2.cc.

Referenced by addItem(), and Schema1Layout().


The documentation for this struct was generated from the following file: