[Xapian-discuss] How does the "class Internal" work?

张慧聪 zhcfreesea at gmail.com
Fri Jul 24 04:19:43 BST 2009


Hi, I've got a problem while reading the xapian-core source code.
I've begun from the include/xapian/base.h
I found that in
template <class T> RefCntPtr
T must be RefCntBase or some type(possibly derived from RefCntBase I think)
with a member called ref_count

But in include/xapian/database.h it declared class Database like below:

 57 class XAPIAN_VISIBILITY_DEFAULT Database {
 58     public:
 59             class Internal;
 60             /// @private @internal Reference counted internals.
 61             std::vector<Xapian::Internal::RefCntPtr<Internal> >
internal;
 62
...
and similar for some other classes.

I've searched the code but cannot find anything that describe/implement
"class Internal" and I'm confused that how does class Internal has a
"ref_count" member and how does it work. Am I missed some knowledge of c++?
Thanx :-P


Gestorm Zhang


More information about the Xapian-discuss mailing list