common/omassert.h File Reference

Various assertion macros. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define CompileTimeAssert(COND)
 Assert that a constant expression is non-zero.
#define Assert(COND)   (void)0
#define AssertRel(A, REL, B)   (void)0
#define AssertEq(A, B)   (void)0
#define AssertEqDouble(A, B)   (void)0
#define AssertParanoid(COND)   (void)0
#define AssertRelParanoid(A, REL, B)   (void)0
#define AssertEqParanoid(A, B)   (void)0
#define AssertEqDoubleParanoid(A, B)   (void)0


Detailed Description

Various assertion macros.

Definition in file omassert.h.


Define Documentation

#define CompileTimeAssert ( COND   ) 

Value:

do {\
        typedef int xapian_compile_time_check_[(COND) ? 1 : -1];\
    } while (0)
Assert that a constant expression is non-zero.

If the assertion fails, compilation fails with an error. There's no run-time overhead for a compile-time assertion, so we always enable them.

This macro must be used within a function (this is because we can only portably generate a "unique" name using __LINE__, but then if this macro is used in header files, multiple headers might be included from the same source file and have CompileTimeAssert() at the same line number.

Definition at line 40 of file omassert.h.

Referenced by FlintTable::add().

#define Assert ( COND   )     (void)0

Definition at line 131 of file omassert.h.

Referenced by Xapian::Query::abort_construction(), NetworkTermList::accumulate_stats(), QuartzTermList::accumulate_stats(), InMemoryTermList::accumulate_stats(), FlintTermList::accumulate_stats(), Xapian::TermIterator::Internal::accumulate_stats(), Btree::add(), FlintTable::add(), Xapian::Database::Internal::add_document(), QuartzWritableDatabase::add_document_(), FlintWritableDatabase::add_document_(), Btree::add_item(), FlintTable::add_item(), Btree::add_item_to_block(), FlintTable::add_item_to_block(), Btree::add_kt(), FlintTable::add_kt(), Xapian::Query::Internal::add_subquery(), Xapian::Query::add_subquery(), add_to_query(), Xapian::QueryParser::add_valuerangeprocessor(), QuartzDocIdList::addDocId(), Btree::alter(), FlintTable::alter(), QPostlistChunkWriter::append(), PostlistChunkWriter::append(), NetworkPostList::append_posting(), MSetPostList::at_end(), MergePostList::at_end(), OrTermList::at_end(), NetworkTermList::at_end(), InMemoryTermList::at_end(), InMemoryAllTermsList::at_end(), MapTermList::at_end(), Xapian::ESet::back(), Xapian::MSet::back(), Btree::basic_open(), FlintTable::basic_open(), Btree::block_to_cursor(), FlintTable::block_to_cursor(), Xapian::TradWeight::calc_termweight(), Xapian::BM25Weight::calc_termweight(), RSetI::calculate_stats(), Btree::cancel(), FlintTable::cancel(), Xapian::Database::Internal::cancel(), ValueRangePostList::check(), ValueGePostList::check(), OrTermList::check_started(), Xapian::Query::Internal::collapse_subqs(), Btree::commit(), FlintTable::commit(), Btree::compact(), FlintTable::compact(), Xapian::MSet::convert_to_percent(), FlintTable::create_and_open(), QuartzDatabase::create_and_open_tables(), FlintDatabase::create_and_open_tables(), BitReader::decode(), Xapian::BitReader::decode(), Btree::del(), Bcursor::del(), FlintTable::del(), FlintCursor::del(), QuartzWritableDatabase::delete_document(), InMemoryDatabase::delete_document(), FlintWritableDatabase::delete_document(), Xapian::Database::Internal::delete_document(), Btree::delete_item(), FlintTable::delete_item(), Btree::delete_kt(), FlintTable::delete_kt(), QueryOptimiser::do_or_like(), QueryOptimiser::do_subquery(), edist_state< CHR >::edist_state(), Xapian::MSet::empty(), BitWriter::encode(), Xapian::ESet::end(), Xapian::MSet::end(), Xapian::Query::end_construction(), Btree::enter_key(), FlintTable::enter_key(), Xapian::MSet::fetch(), Bcursor::find_entry(), FlintCursor::find_entry(), FlintCursor::find_entry_ge(), InMemoryDatabase::finish_add_doc(), Xapian::Query::Internal::flatten_subqs(), FlintAllTermsList::FlintAllTermsList(), QPostlistChunkWriter::flush(), PostlistChunkWriter::flush(), Xapian::Database::Internal::flush(), Item_wr::form_key(), AllTermsList::get_approx_size(), MapTermList::get_approx_size(), Xapian::Unicode::Internal::get_character_info(), QuartzPostListTable::get_chunk(), FlintPostListTable::get_chunk(), MultiMatch::get_collapse_key(), MSetPostList::get_collapse_key(), MergePostList::get_collapse_key(), RemoteDatabase::get_collection_freq(), QuartzDatabase::get_collection_freq(), QuartzAllTermsList::get_collection_freq(), InMemoryAllTermsList::get_collection_freq(), FlintDatabase::get_collection_freq(), FlintAllTermsList::get_collection_freq(), Xapian::TermIterator::Internal::get_collection_freq(), Xapian::ESet::get_description(), Xapian::MSet::get_description(), Xapian::MSet::Internal::get_doc_by_index(), XorPostList::get_docid(), ValueRangePostList::get_docid(), OrPostList::get_docid(), MSetPostList::get_docid(), MergePostList::get_docid(), AndMaybePostList::get_docid(), EmptyPostList::get_docid(), QuartzPostList::get_docid(), QuartzAllDocsPostList::get_docid(), MultiPostList::get_docid(), InMemoryAllDocsPostList::get_docid(), InMemoryPostList::get_docid(), FlintPostList::get_docid(), ContiguousAllDocsPostList::get_docid(), XorPostList::get_doclength(), ValueRangePostList::get_doclength(), OrPostList::get_doclength(), MultiAndPostList::get_doclength(), MergePostList::get_doclength(), AndMaybePostList::get_doclength(), EmptyPostList::get_doclength(), RemoteDatabase::get_doclength(), QuartzPostList::get_doclength(), QuartzDatabase::get_doclength(), QuartzAllDocsPostList::get_doclength(), MultiPostList::get_doclength(), FlintPostList::get_doclength(), FlintDatabase::get_doclength(), FlintAllDocsPostList::get_doclength(), ContiguousAllDocsPostList::get_doclength(), Xapian::PostingIterator::get_doclength(), Xapian::Database::get_doclength(), Xapian::Database::get_document(), Btree::get_exact_entry(), FlintTable::get_exact_entry(), Xapian::MSet::get_firstitem(), get_int4(), Bcursor::get_key(), FlintCursor::get_key(), Xapian::Database::get_lastdocid(), Xapian::MSet::get_matches_estimated(), Xapian::MSet::get_matches_lower_bound(), Xapian::MSet::get_matches_upper_bound(), Xapian::MSet::get_max_attained(), Xapian::MSet::get_max_possible(), get_max_subqs(), get_min_subqs(), MultiMatch::get_mset(), Xapian::Enquire::Internal::get_mset(), QuartzPositionList::get_position(), InMemoryPositionList::get_position(), FlintPositionList::get_position(), Term::get_query(), Stats::get_reltermfreq(), OrTermList::get_termfreq(), Stats::get_termfreq(), RemoteDatabase::get_termfreq(), NetworkTermList::get_termfreq(), QuartzDatabase::get_termfreq(), QuartzAllTermsList::get_termfreq(), InMemoryTermList::get_termfreq(), InMemoryAllTermsList::get_termfreq(), FlintSpellingWordsList::get_termfreq(), FlintDatabase::get_termfreq(), FlintAllTermsList::get_termfreq(), Xapian::TermIterator::get_termfreq(), VectorTermList::get_termname(), NetworkTermList::get_termname(), QuartzAllTermsList::get_termname(), InMemoryTermList::get_termname(), InMemoryAllTermsList::get_termname(), FlintSynonymTermList::get_termname(), FlintSpellingWordsList::get_termname(), FlintMetadataTermList::get_termname(), FlintAllTermsList::get_termname(), MapTermList::get_termname(), Xapian::ValueIterator::get_valueno(), VectorTermList::get_wdf(), NetworkTermList::get_wdf(), QuartzPostList::get_wdf(), QuartzAllDocsPostList::get_wdf(), InMemoryTermList::get_wdf(), FlintPostList::get_wdf(), FlintAllDocsPostList::get_wdf(), ContiguousAllDocsPostList::get_wdf(), Xapian::TermIterator::get_wdf(), Xapian::PostingIterator::get_wdf(), MapTermList::get_wdf(), XorPostList::get_weight(), ValueRangePostList::get_weight(), OrPostList::get_weight(), MultiAndPostList::get_weight(), MSetPostList::get_weight(), MergePostList::get_weight(), AndMaybePostList::get_weight(), Xapian::Internal::ExpandWeight::get_weight(), EmptyPostList::get_weight(), GETINT1(), getint1(), GETINT2(), getint2(), getint4(), InMemoryPostList::InMemoryPostList(), FlintTable::key_exists(), FlintLock::lock(), InMemoryDatabase::make_posting(), make_start_of_chunk(), InMemoryTermEntry::merge(), InMemoryPosting::merge(), QuartzPostListTable::merge_changes(), FlintSpellingTable::merge_changes(), FlintPostListTable::merge_changes(), ProbQuery::merge_filters(), merge_postlists(), Btree::mid_point(), FlintTable::mid_point(), QuartzPostList::move_to_chunk_containing(), FlintPostList::move_to_chunk_containing(), MultiMatch::MultiMatch(), XorPostList::next(), ValueRangePostList::next(), ValueGePostList::next(), SelectPostList::next(), OrPostList::next(), MSetPostList::next(), VectorTermList::next(), NetworkTermList::next(), QuartzPositionList::next(), Bcursor::next(), MultiPostList::next(), InMemoryPositionList::next(), InMemoryAllDocsPostList::next(), InMemoryTermList::next(), InMemoryPostList::next(), InMemoryAllTermsList::next(), FlintTermList::next(), FlintSynonymTermList::next(), FlintSpellingWordsList::next(), FlintPositionList::next(), FlintMetadataTermList::next(), FlintCursor::next(), FlintAllTermsList::next(), FlintAllDocsPostList::next(), ContiguousAllDocsPostList::next(), MapTermList::next(), Btree::next_default(), FlintTable::next_default(), Btree::next_for_sequential(), FlintTable::next_for_sequential(), QuartzPostList::next_in_chunk(), FlintPostList::next_in_chunk(), QuartzPositionList::next_internal(), QuartzWritableDatabase::open_document(), QuartzDatabase::open_document(), FlintDatabase::open_document(), ValueRangePostList::open_position_list(), EmptyPostList::open_position_list(), QuartzWritableDatabase::open_position_list(), QuartzDatabase::open_position_list(), FlintDatabase::open_position_list(), InMemoryDatabase::open_post_list(), QuartzWritableDatabase::open_term_list(), QuartzDatabase::open_term_list(), FlintDatabase::open_term_list(), Xapian::ValueIterator::operator *(), Xapian::TermIterator::operator *(), Xapian::PostingIterator::operator *(), Xapian::PositionIterator::operator *(), SortPosName::operator()(), Xapian::ByQueryIndexCmp::operator()(), QuartzDocIdListIterator::operator++(), Xapian::TermIterator::operator++(), Xapian::PostingIterator::operator++(), Xapian::PositionIterator::operator++(), Xapian::ValueIterator::operator->(), Xapian::ESet::operator[](), Xapian::MSet::operator[](), OrTermList::positionlist_begin(), Xapian::TermIterator::positionlist_begin(), Xapian::PostingIterator::positionlist_begin(), OrTermList::positionlist_count(), Xapian::TermIterator::positionlist_count(), LocalSubMatch::postlist_from_op_leaf_query(), Bcursor::prev(), FlintCursor::prev(), Btree::prev_default(), FlintTable::prev_default(), Btree::prev_for_sequential(), FlintTable::prev_for_sequential(), QuartzTermList::QuartzTermList(), QPostlistChunkWriter::raw_append(), PostlistChunkWriter::raw_append(), RemoteConnection::read_at_least(), BitReader::read_bits(), Xapian::BitReader::read_bits(), Btree::read_block(), FlintTable::read_block(), ValueRangePostList::read_position_list(), EmptyPostList::read_position_list(), Btree::read_root(), FlintTable::read_root(), Bcursor::read_tag(), FlintCursor::read_tag(), FlintAllTermsList::read_termfreq_and_collfreq(), ValueRangePostList::recalc_maxweight(), QuartzWritableDatabase::replace_document(), InMemoryDatabase::replace_document(), FlintWritableDatabase::replace_document(), Xapian::Database::Internal::replace_document(), Xapian::Stem::Internal::replace_s(), Xapian::Query::Internal::serialise(), serialise_document(), serialise_double(), Btree::set_full_compaction(), FlintTable::set_full_compaction(), set_int4(), FlintPositionListTable::set_positionlist(), Stats::set_reltermfreq(), Stats::set_termfreq(), FlintTermListTable::set_termlist(), LeafPostList::set_termweight(), SETINT1(), setint1(), SETINT2(), setint2(), setint4(), Xapian::Query::Internal::simplify_matchnothing(), Xapian::Query::Internal::simplify_query(), Xapian::MSet::size(), XorPostList::skip_to(), ValueRangePostList::skip_to(), ValueGePostList::skip_to(), SelectPostList::skip_to(), OrPostList::skip_to(), VectorTermList::skip_to(), QuartzPostList::skip_to(), MultiPostList::skip_to(), InMemoryAllDocsPostList::skip_to(), InMemoryPostList::skip_to(), InMemoryAllTermsList::skip_to(), FlintSynonymTermList::skip_to(), FlintSpellingWordsList::skip_to(), FlintPostList::skip_to(), FlintAllTermsList::skip_to(), ContiguousAllDocsPostList::skip_to(), Xapian::PostingIterator::skip_to(), Xapian::PositionIterator::skip_to(), Xapian::Stem::Internal::slice_check(), Xapian::sortable_serialise(), Xapian::sortable_unserialise(), split_rset_by_db(), Xapian::Query::start_construction(), RemoteDatabase::term_exists(), QuartzDatabase::term_exists(), InMemoryDatabase::term_exists(), FlintDatabase::term_exists(), Xapian::Database::termlist_begin(), Xapian::Document::Internal::termlist_count(), Xapian::Query::Internal::validate_query(), Xapian::Document::Internal::values_count(), BitWriter::write_bits(), Btree::write_block(), FlintTable::write_block(), write_start_of_chunk(), and zeroed_new().

#define AssertRel ( A,
REL,
 )     (void)0

Definition at line 132 of file omassert.h.

Referenced by QueryOptimiser::do_and_like(), QueryOptimiser::do_or_like(), and PhrasePostList::do_test().

#define AssertEq ( A,
 )     (void)0

Definition at line 133 of file omassert.h.

Referenced by Btree::block_to_cursor(), FlintTable::block_to_cursor(), Xapian::Query::Internal::collapse_subqs(), QueryOptimiser::do_and_like(), QueryOptimiser::do_subquery(), OrTermList::next(), FlintTable::next_for_sequential(), Btree::open(), FlintTable::open(), LocalSubMatch::postlist_from_op_leaf_query(), FlintTable::prev_for_sequential(), and RemoteServer::RemoteServer().

#define AssertEqDouble ( A,
 )     (void)0

Definition at line 134 of file omassert.h.

Referenced by MultiAndPostList::get_doclength(), AndPostList::get_doclength(), and AndMaybePostList::get_doclength().

#define AssertParanoid ( COND   )     (void)0

Definition at line 138 of file omassert.h.

Referenced by OrPostList::at_end(), ValueRangePostList::get_termfreq_est(), ValueRangePostList::get_termfreq_max(), MultiAndPostList::get_termfreq_min(), Btree::write_block(), and FlintTable::write_block().

#define AssertRelParanoid ( A,
REL,
 )     (void)0

Definition at line 139 of file omassert.h.

Referenced by ValueRangePostList::check(), and ValueGePostList::check().

#define AssertEqParanoid ( A,
 )     (void)0

Definition at line 140 of file omassert.h.

Referenced by MultiPostList::get_doclength(), InMemoryDatabase::make_doc(), Btree::write_block(), and FlintTable::write_block().

#define AssertEqDoubleParanoid ( A,
 )     (void)0

Definition at line 141 of file omassert.h.

Referenced by MultiMatch::getorrecalc_maxweight().


Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.