• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

kcachegrind

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Loader Class Reference

#include <loader.h>

Inherited by CachegrindLoader.

Public Member Functions

 Loader (const QString &name, const QString &desc)
 
virtual ~Loader ()
 
virtual bool canLoad (QIODevice *file)
 
QString description () const
 
virtual int load (TraceData *, QIODevice *file, const QString &filename)
 
QString name () const
 
void setLogger (Logger *)
 

Static Public Member Functions

static void deleteLoaders ()
 
static void initLoaders ()
 
static Loader * loader (const QString &name)
 
static Loader * matchingLoader (QIODevice *file)
 

Protected Member Functions

void loadError (int line, const QString &msg)
 
void loadFinished (const QString &msg=QString::null)
 
void loadProgress (int progress)
 
void loadStart (const QString &filename)
 
void loadWarning (int line, const QString &msg)
 

Protected Attributes

Logger * _logger
 

Detailed Description

To implement a new loader, inherit from the Loader class and and reimplement canLoad() and load().

For registration, put into the static initLoaders() function of this base class a _loaderList.append(new MyLoader()).

matchingLoader() returns the first loader able to load a file.

To show progress and warnings while loading, loadStatus(), loadError() and loadWarning() should be called. These are just shown as status, warnings or errors to the user, but do not show real failure, as even errors can be recoverable. For unablility to load a file, return 0 in load().

Definition at line 51 of file loader.h.

Constructor & Destructor Documentation

Loader::Loader ( const QString &  name,
const QString &  desc 
)

Definition at line 31 of file loader.cpp.

Loader::~Loader ( )
virtual

Definition at line 39 of file loader.cpp.

Member Function Documentation

bool Loader::canLoad ( QIODevice *  file)
virtual

Definition at line 42 of file loader.cpp.

void Loader::deleteLoaders ( )
static

Definition at line 79 of file loader.cpp.

QString Loader::description ( ) const
inline

Definition at line 71 of file loader.h.

void Loader::initLoaders ( )
static

Definition at line 73 of file loader.cpp.

int Loader::load ( TraceData *  ,
QIODevice *  file,
const QString &  filename 
)
virtual

Definition at line 47 of file loader.cpp.

Loader * Loader::loader ( const QString &  name)
static

Definition at line 61 of file loader.cpp.

void Loader::loadError ( int  line,
const QString &  msg 
)
protected

Definition at line 104 of file loader.cpp.

void Loader::loadFinished ( const QString &  msg = QString::null)
protected

Definition at line 116 of file loader.cpp.

void Loader::loadProgress ( int  progress)
protected

Definition at line 98 of file loader.cpp.

void Loader::loadStart ( const QString &  filename)
protected

Definition at line 92 of file loader.cpp.

void Loader::loadWarning ( int  line,
const QString &  msg 
)
protected

Definition at line 110 of file loader.cpp.

Loader * Loader::matchingLoader ( QIODevice *  file)
static

Definition at line 52 of file loader.cpp.

QString Loader::name ( ) const
inline

Definition at line 70 of file loader.h.

void Loader::setLogger ( Logger *  l)

Definition at line 87 of file loader.cpp.

Member Data Documentation

Logger* Loader::_logger
protected

Definition at line 85 of file loader.h.


The documentation for this class was generated from the following files:
  • loader.h
  • loader.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:39:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kcachegrind

Skip menu "kcachegrind"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal