void operator () (const value_type & val) { ACE_DEBUG ((LM_INFO, ACE_TEXT ("%T (%t) - %M - constructing %s environment\n"), val->id ().c_str ())); // Allocate a new virtual environment. CUTS_Virtual_Env * env = 0; this->env_mgr_.create (val->id ().c_str (), env); *env <<= *val; if (val->active_p () && val->active ()) this->active_env_ = val->id ().c_str (); }
std::pair< typename viennagrid::result_of::container_of<container_collection_type, value_type>::type::handle_type, bool > physical_insert( value_type element, inserter_type & inserter ) { typedef typename viennagrid::result_of::container_of<container_collection_type, value_type>::type container_type; typedef typename viennagrid::result_of::container_of<container_collection_type, value_type>::type::handle_type handle_type; container_type & container = viennagrid::get< value_type >( *collection ); if ( generate_id && !container.is_present( element ) ) viennagrid::detail::set_id(element, id_generator( viennagrid::detail::tag<value_type>() ) ); if (!generate_id) id_generator.set_max_id( element.id() ); std::pair<handle_type, bool> ret = container.insert( element ); if (change_counter) ++(*change_counter); if (call_callback) viennagrid::detail::insert_callback( container.dereference_handle(ret.first), ret.second, inserter); inserter.handle_insert( ret.first, viennagrid::detail::tag<value_type>() ); return ret; }
void operator () (const value_type & value) { CUTS_Process_Options opts; // Initialize the process options. opts.name_ = value->id ().c_str (); opts.exec_ = value->executable ().c_str (); if (value->arguments_p ()) opts.args_ = value->arguments ().c_str (); if (value->workingdirectory_p ()) opts.cwd_ = value->workingdirectory ().c_str (); if (value->delay_p ()) opts.delay_.set (value->delay ()); if (value->waitforcompletion_p ()) opts.wait_for_completion_ = value->waitforcompletion (); if (value->output_p ()) opts.stdout_ = value->output ().c_str (); if (value->error_p ()) opts.stderr_ = value->error ().c_str (); // Install the process into the environment. int retval; if (this->startup_) retval = this->env_.startup_list ().append (opts); else retval = this->env_.shutdown_list ().append (opts); if (0 != retval) ACE_ERROR ((LM_ERROR, ACE_TEXT ("%T (%t) - %M - failed to add %s to %s process list\n"), opts.name_.c_str (), this->startup_ ? ACE_TEXT ("startup") : ACE_TEXT ("shutdown"))); }
static typename result_of::const_handle_type<container_type, id_handle_tag>::type handle( container_type const &, value_type const & value ) { return value.id(); }