fix tricky regression noticed by Vyacheslav Tokarev on Google Reader.
[kdelibs.git] / khtml / misc / khtml_partaccessor.h
blob4160cacec1b14dcc49986d90923b2f6aec018930
1 /* This file is part of the KDE project
3 * Copyright (C) 2004 Leo Savernik <l.savernik@aon.at>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #ifndef KHTML_PARTACCESSOR_H
22 #define KHTML_PARTACCESSOR_H
24 #include "khtml_part.h"
26 namespace khtml {
28 /**
29 * This class is merely a namespace for static accessor methods to private
30 * methods of KHTMLPart.
32 * As this class is a friend of KHTMLPart, and every method of this class is
33 * public, it can be used to invoke methods of KHTMLPart that otherwise would
34 * be private to functions that cannot be declared friends to KHTMLPart
35 * (i. e. functions that belong to anonymous namespaces)
36 * @author Leo Savernik
37 * @internal
39 class KHTMLPartAccessor {
40 KHTMLPartAccessor();
41 ~KHTMLPartAccessor();
42 public:
44 inline static DOM::DocumentImpl *xmlDocImpl(const KHTMLPart *part) { return part->xmlDocImpl(); }
45 inline static const DOM::Selection &caret(const KHTMLPart *part) { return part->caret(); }
46 inline static void clearSelection(KHTMLPart *part) { part->clearSelection(); }
48 inline static KHTMLPartPrivate *d(const KHTMLPart *part) { return part->d; }
51 }/*namespace khtml*/
54 #endif // KHTML_PARTACCESSOR_H