1 /* \file CoordCache.cpp
2 * This file is part of LyX, the document processor.
3 * Licence details can be found in the file COPYING.
7 * Full author contact details are available in file CREDITS.
12 #include "CoordCache.h"
17 #include "insets/Inset.h"
19 #include <boost/assert.hpp>
24 Point::Point(int x, int y)
27 BOOST_ASSERT(x > -1000000);
28 BOOST_ASSERT(x < 1000000);
29 BOOST_ASSERT(y > -1000000);
30 BOOST_ASSERT(y < 1000000);
33 // just a helper to be able to set a breakpoint
34 void lyxbreaker(void const * data, const char * hint, int size)
36 lyxerr << "break on pointer: " << data << " hint: " << hint
37 << " size: " << size << std::endl;
42 void CoordCache::clear()
49 void CoordCache::dump() const
51 lyxerr << "InsetCache contains:" << std::endl;
52 for (CoordCacheBase<Inset>::cache_type::const_iterator it = getInsets().getData().begin(); it != getInsets().getData().end(); ++it) {
53 Inset const * inset = it->first;
54 Point const p = it->second.pos;
55 lyxerr << "Inset " << inset << "(" << to_utf8(inset->name())
56 << ") has point " << p.x_ << "," << p.y_ << std::endl;