예제 #1
0
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
assert_valid(const char* __file, int __line) const
{
  if (m_p_head->m_p_parent != 0)
    m_p_head->m_p_parent->assert_valid(this, __file, __line);
  assert_iterators(__file, __line);
  assert_reverse_iterators(__file, __line);
  if (m_p_head->m_p_parent == 0)
    {
      PB_DS_DEBUG_VERIFY(m_p_head->m_p_min == m_p_head);
      PB_DS_DEBUG_VERIFY(m_p_head->m_p_max == m_p_head);
      PB_DS_DEBUG_VERIFY(empty());
      return;
    }

  PB_DS_DEBUG_VERIFY(m_p_head->m_p_min->m_type == leaf_node);
  PB_DS_DEBUG_VERIFY(m_p_head->m_p_max->m_type == leaf_node);
  PB_DS_DEBUG_VERIFY(!empty());
}
예제 #2
0
PB_DS_CLASS_T_DEC
void
PB_DS_CLASS_C_DEC::
assert_valid() const
{
  if (m_p_head->m_p_parent != NULL)
    m_p_head->m_p_parent->assert_valid(this);
  assert_iterators();
  assert_reverse_iterators();
  if (m_p_head->m_p_parent == NULL)
    {
      _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_min == m_p_head);
      _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_max == m_p_head);
      _GLIBCXX_DEBUG_ASSERT(empty());
      return;
    }

  _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_min->m_type == pat_trie_leaf_node_type);
  _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_max->m_type == pat_trie_leaf_node_type);
  _GLIBCXX_DEBUG_ASSERT(!empty());
}