• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

tdesycocaentry.h
00001 /*  This file is part of the KDE libraries
00002  *  Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
00003  *
00004  *  This library is free software; you can redistribute it and/or
00005  *  modify it under the terms of the GNU Library General Public
00006  *  License version 2 as published by the Free Software Foundation;
00007  *
00008  *  This library is distributed in the hope that it will be useful,
00009  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011  *  Library General Public License for more details.
00012  *
00013  *  You should have received a copy of the GNU Library General Public License
00014  *  along with this library; see the file COPYING.LIB.  If not, write to
00015  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016  *  Boston, MA 02110-1301, USA.
00017  **/
00018 
00019 #ifndef __tdesycocaentry_h__
00020 #define __tdesycocaentry_h__
00021 
00022 #include "tdesycocatype.h"
00023 
00024 #include <tqstringlist.h>
00025 #include <ksharedptr.h>
00026 class TQDataStream;
00027 
00037 class TDECORE_EXPORT KSycocaEntry : public TDEShared
00038 {
00039  
00040 public:
00041    virtual bool isType(KSycocaType t) const { return (t == KST_KSycocaEntry); }
00042    virtual KSycocaType sycocaType() const { return KST_KSycocaEntry; }
00043 
00044 public:
00045   typedef TDESharedPtr<KSycocaEntry> Ptr;
00046   typedef TQValueList<Ptr> List;
00047 public: // KDoc seems to barf on those typedefs and generates no docs after them
00051    KSycocaEntry(const TQString &path) : mOffset(0), m_bDeleted(false), mPath(path) { }
00052 
00056    static void read( TQDataStream &s, TQString &str );
00057    static void read( TQDataStream &s, TQStringList &list );
00058 
00063    KSycocaEntry( TQDataStream &_str, int offset ) : 
00064               mOffset( offset ), m_bDeleted(false) 
00065    { 
00066      read(_str, mPath);
00067    }
00068 
00072    virtual TQString name() const = 0;
00073 
00079    TQString entryPath() const { return mPath; }
00080   
00084    virtual bool isValid() const = 0;
00085   
00089    virtual bool isDeleted() const { return m_bDeleted; }
00090 
00095    int offset() { return mOffset; }
00096 
00102    virtual void save(TQDataStream &s)
00103      {
00104        mOffset = s.device()->at(); // store position in member variable
00105        s << (TQ_INT32) sycocaType() << mPath;
00106      }
00107 
00112    virtual void load(TQDataStream &) = 0;
00113 
00114 private:
00115    int mOffset;
00116 protected:
00117    bool m_bDeleted;
00118    TQString mPath;   
00119 protected:
00120    virtual void virtual_hook( int id, void* data );
00121 };
00122 
00123 #endif

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.