INLINE bool StringID<T>::operator == ( const self_t& _string_id ) const { ex_assert_slow( (GetString() == _string_id.GetString()) == (m_ID == _string_id.m_ID), "The debug string is not the same (%s != %s)", GetString().c_str(), _string_id.GetString().c_str() ); return (this->m_ID == _string_id.m_ID); }
bool equal_aux(self_t const& other, boost::forward_traversal_tag) const { if (is_end() != other.is_end()) return false; else if (is_end() && other.is_end()) return true; else { BOOST_ASSERT(!is_end() && !other.is_end()); return *m_result == *other.m_result; } }
static void my_actor(self_t self, aid_t base) { std::size_t loop_num = 10; yield_t yield = self.get_yield(); timer_t tmr(self.get_cache_pool()->get_context().get_io_service()); for (std::size_t i=0; i<loop_num; ++i) { send(self, base, atom("echo")); recv(self, atom("echo")); tmr.expires_from_now(boost::chrono::milliseconds(1)); tmr.async_wait(yield); } }
phys_state(self_t &self, phys_aircraft_ptr phys_aircraft, geo_base_3 const& base) : self_(self) //, on_ground_(false) , phys_aircraft_(phys_aircraft) , base_(base) { self.set_nm_angular_smooth(2); self_.set_phys_aircraft(phys_aircraft_); }
static boost::python::dict get_metadata(const self_t& Self) { boost::python::dict result; const array::metadata_t metadata = Self.wrapped().get_metadata(); for(array::metadata_t::const_iterator pair = metadata.begin(); pair != metadata.end(); ++pair) result[pair->first] = pair->second; return result; }
phys_state2(self_t &self, aircraft::phys_aircraft_ptr phys_aircraft, geo_base_3 const& base) : self_(self) , desired_speed_(aircraft::min_desired_velocity()) , on_ground_(false) , phys_aircraft_(phys_aircraft) , base_(base) { self.set_nm_angular_smooth(2); self_.set_phys_model(phys_aircraft_); }
inline void bind( self_t sire, std::string const& ep, /// endpoint bool is_router = false, /// if this bind is router, set it true remote_func_list_t const& remote_func_list = remote_func_list_t(), net_option opt = net_option() ) { detail::cache_pool* user = 0; detail::cache_pool* owner = sire.get_cache_pool(); detail::bind(user, owner, ep, is_router, remote_func_list, opt); }
inline void connect( self_t sire, ctxid_t target, /// connect target std::string const& ep, /// endpoint bool target_is_router = false, /// if target is router, set it true net_option opt = net_option(), remote_func_list_t const& remote_func_list = remote_func_list_t() ) { detail::cache_pool* user = 0; detail::cache_pool* owner = sire.get_cache_pool(); detail::connect(user, owner, target, ep, target_is_router, remote_func_list, opt); }
static void echo(self_t self) { try { while (true) { message msg; aid_t sender = self.recv(msg); match_t type = msg.get_type(); if (type == atom("echo")) { self.send(sender, msg); } else { break; } } } catch (std::exception& ex) { std::cerr << "echo except: " << ex.what() << std::endl; } }
static const string_t array_str(const self_t& Self) { std::ostringstream buffer; buffer << Self.wrapped(); return buffer.str(); }
static string_t get_metadata_value(const self_t& Self, const string_t& Name) { return Self.wrapped().get_metadata_value(Name); }
bool equal_aux(self_t const& other, boost::single_pass_traversal_tag) const { return is_end() == other.is_end(); }
bool equal(self_t const& other) const { return is_end() == other.is_end(); }