// // Visit_PackageFile_i // void Stub_Generator:: Visit_PackageFile_i (const Udm::Object & obj) { // Gather all the necessary elements. std::set <CHAOS::Event> events = Udm::ChildrenAttr <CHAOS::Event> (obj.__impl (), Udm::NULLCHILDROLE); for (auto event : events) event.Accept (*this); // Write the output stream generators. std::set <CHAOS::Aggregate> aggrs = Udm::ChildrenAttr <CHAOS::Aggregate> (obj.__impl (), Udm::NULLCHILDROLE); for (auto aggr : aggrs) aggr.Accept (*this); std::set <CHAOS::Collection> colls = Udm::ChildrenAttr <CHAOS::Collection> (obj.__impl (), Udm::NULLCHILDROLE); for (auto coll : colls) coll.Accept (*this); std::set <CHAOS::Package> packages = Udm::ChildrenAttr <CHAOS::Package> (obj.__impl (), Udm::NULLCHILDROLE); for (auto package : packages) package.Accept (*this); }
void Visit_PackageFile_i (const Udm::Object & obj) { // Visit all the packages. std::vector <CHAOS::Package> packages = Udm::ChildrenAttr <CHAOS::Package> (obj.__impl (), Udm::NULLCHILDROLE); for (auto package : packages) package.Accept (*this); // Does this level contain any events. std::vector <CHAOS::Event> events = Udm::ChildrenAttr <CHAOS::Event> (obj.__impl (), Udm::NULLCHILDROLE); if (!events.empty () && !this->has_events_) this->has_events_ = true; // Visit all the components. std::vector <CHAOS::Component> components = Udm::ChildrenAttr <CHAOS::Component> (obj.__impl (), Udm::NULLCHILDROLE); for (auto component : components) component.Accept (*this); }
// // Visit_PackageFile_i // void CUTS_BE_TCPIP_Stub_Source_Generator:: Visit_PackageFile_i (const Udm::Object & obj) { CUTS_BE_TCPIP::Output_Stream_Source_Generator osg (this->outfile_); CUTS_BE_TCPIP::Input_Stream_Source_Generator isg (this->outfile_); // Gather all the necessary elements. std::set <CHAOS::Event> events = Udm::ChildrenAttr <CHAOS::Event> (obj.__impl (), Udm::NULLCHILDROLE); std::set <CHAOS::Aggregate> aggrs = Udm::ChildrenAttr <CHAOS::Aggregate> (obj.__impl (), Udm::NULLCHILDROLE); std::set <CHAOS::Collection> colls = Udm::ChildrenAttr <CHAOS::Collection> (obj.__impl (), Udm::NULLCHILDROLE); // Write the output stream generators. for (auto aggr : aggrs) aggr.Accept (osg); for (auto event : events) event.Accept (osg); for (auto coll : colls) coll.Accept (osg); // Write the input stream generators. for (auto aggr : aggrs) aggr.Accept (isg); for (auto event : events) event.Accept (isg); for (auto coll : colls) coll.Accept (isg); std::set <CHAOS::Package> packages = Udm::ChildrenAttr <CHAOS::Package> (obj.__impl (), Udm::NULLCHILDROLE); for (auto package : packages) package.Accept (*this); }