Exemplo n.º 1
0
 CHAR_T current() const
 {
   if (atend())
     return CHAR_NULL;
   else
     return _text[_pos];
 }
Exemplo n.º 2
0
void LLSideTrayListener::getPanels(const LLSD& event) const
{
    LLSD reply;

    LLSideTray* tray = mGetter();
    // Iterate through the attached tabs.
    LLSD::Integer ord(0);
    for (LLSideTray::child_vector_t::const_iterator
             ati(tray->mTabs.begin()), atend(tray->mTabs.end());
         ati != atend; ++ati)
    {
        // We don't have access to LLSideTrayTab: the class definition is
        // hidden in llsidetray.cpp. But as LLSideTrayTab isa LLPanel, use the
        // LLPanel API. Unfortunately, without the LLSideTrayTab definition,
        // the compiler doesn't even know this LLSideTrayTab* is an LLPanel*.
        // Persuade it.
        LLPanel* tab(tab_cast<LLPanel*>(*ati));
        reply[tab->getName()] = getTabInfo(tab).with("attached", true).with("ord", ord);
    }

    // Now iterate over the detached tabs. These can also be opened via
    // SideTray.ShowPanel.
    ord = 0;
    for (LLSideTray::child_vector_t::const_iterator
             dti(tray->mDetachedTabs.begin()), dtend(tray->mDetachedTabs.end());
         dti != dtend; ++dti)
    {
        LLPanel* tab(tab_cast<LLPanel*>(*dti));
        reply[tab->getName()] = getTabInfo(tab).with("attached", false).with("ord", ord);
    }

    sendReply(reply, event);
}
Exemplo n.º 3
0
    bool operator< (  const RadioIter & other ) const
    {
      if (atend())
      {
	return false;
      }
      else if ( other.atend() )
      {
	return true;
      }
      else
      {
	return (*f_i) < (*other.f_i);
      }
    }
Exemplo n.º 4
0
  void format()
  {
		if (atend()) {
			m_buf[0] = '\0';
		} else {
			value_type value = m_tracer->at(tracer_type::to_ticket(m_here));
			int printed = snprintf(m_buf, m_bufsize, "%8.1f (%6d times):", value.average(), value.samples());
			if (m_bufsize-1 <= static_cast<size_t>(printed)) {
				return; // filled
			}
	
			char* buf = m_buf + printed;
			size_t dummy = 0;
			m_tracer->format_name(m_here, buf, m_bufsize - printed, &dummy);
		}
	}
Exemplo n.º 5
0
 bool ateol() const
 {
   return atend()
     || _text[_pos] == '\r'
     || _text[_pos] == '\n';
 }
Exemplo n.º 6
0
 CHAR_T next()
 {
   if (atend())
     return CHAR_NULL;
   return _text[_pos++];
 }