21 #ifndef XAPIAN_INCLUDED_PRETTY_H
22 #define XAPIAN_INCLUDED_PRETTY_H
52 template<
class S,
class T>
75 template<
class S,
class T>
87 template<
class S,
class T>
99 ps.
os <<
"(void*)" << t;
105 inline void write_ch(std::ostream & os,
unsigned char ch)
107 if (ch < 32 || ch >= 127) {
109 if (ch >= 7 && ch <= 13) {
110 os <<
"abtnvfr"[ch - 7];
112 os << char(
'0' | (ch >> 6));
113 os << char(
'0' | ((ch >> 3) & 7));
114 os << char(
'0' | (ch & 7));
116 }
else if (ch ==
'\\') {
118 }
else if (ch ==
'"') {
142 for (std::string::const_iterator i =
str.begin(); i !=
str.end(); ++i) {
153 ps.
os <<
"std::string&";
161 ps.
os <<
"std::string*";
170 if (ch < 32 || ch >= 127) {
172 if (ch >= 7 && ch <= 13) {
173 ps.
os <<
"abtnvfr"[ch - 7];
174 }
else if (ch ==
'\0') {
177 ps.
os <<
"0123456789abcdef"[ch >> 4];
178 ps.
os <<
"0123456789abcdef"[ch & 0x0f];
180 }
else if (ch ==
'\\') {
182 }
else if (ch ==
'\'') {
195 ps.
os << (b ?
"true" :
"false");
213 ps.
os <<
"(Xapian::termcount*)" << (
void*)p;
217 template<
class S,
typename T>
220 ps.
os <<
"std::list&";
224 template<
class S,
typename T>
227 ps.
os <<
"std::list";
232 template<
class S,
typename K,
typename V>
235 ps.
os <<
"std::map*";
239 template<
class S,
typename K,
typename V>
242 ps.
os <<
"std::map&";
246 template<
class S,
typename K,
typename V>
249 ps.
os <<
"std::map(" << m.size() <<
')';
254 template<
class S,
typename T>
257 ps.
os <<
"std::vector(" << v.size() <<
')';
262 template<
class S,
typename T,
typename U>
265 ps.
os <<
"std::pair(" << v.first <<
", " << v.second <<
')';
295 #define XAPIAN_PRETTY_AS_CLASSNAME(C)\
297 inline PrettyOStream<S> &\
298 operator<<(PrettyOStream<S> &ps, const C &) {\
324 ps.
os <<
"(Xapian:Weight*)" << (
const void*)p;
333 ps.
os <<
"RemoteConnection";
342 ps.
os <<
"(Database::Internal*)" << (
const void*)p;
346 template<
class S,
class T>
349 ps.
os <<
"intrusive_ptr->";
350 return ps << t.
get();
database class declarations
A cursor pointing to a position in a Btree table, for reading several entries in order,...
A backend designed for efficient indexing and retrieval, using compressed posting lists and a btree s...
Class managing a Btree table in a Chert database.
A cursor pointing to a position in a Btree table, for reading several entries in order,...
A backend designed for efficient indexing and retrieval, using compressed posting lists and a btree s...
Class managing a Btree table in a Glass database.
A RemoteConnection object provides a bidirectional connection to another RemoteConnection object on a...
Base class for databases.
Virtual base class for expand decider functor.
Collates statistics while calculating term weight in an ESet.
Class for calculating ESet term weights.
A smart pointer that uses intrusive reference counting.
Base class for calculating distances between two lat/long coordinates.
Base class for matcher decision functor.
Registry for user subclasses.
Abstract base class for weighting schemes.
string str(int value)
Convert int to std::string.
The Xapian namespace contains public interfaces for the Xapian library.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
#define XAPIAN_PRETTY_AS_CLASSNAME(C)
PrettyOStream< S > & operator<<(PrettyOStream< S > &ps, const T &t)
Default is to output as std::ostream would.
void write_ch(std::ostream &os, unsigned char ch)
Literal(const std::string &s)
PrettyOStream & operator|(const T &t)
S & os
The std::ostream object we're outputting to.