GLIMSView Source Code Documentation

Plugin Class Reference

#include <plugin.h>

Inheritance diagram for Plugin:

Inheritance graph
[legend]

List of all members.


Detailed Description

An implementation of a plugin interface allowing application extensibility.

This is designed to let a programer develop a C++ plugin that extends this class and overrides its members to perform actions on the currently loaded project. A project is passed to the plugin through its constructor. The plugin should define the name of itself which will be available in the menu system under Tools->Plugins for execution. The plugin should also define its description which is available in the plugin configurator. A description of how to implement a plugin is available within the source tree of this distribution.

NOTE: This is the only code within glimsviewer other than windows_defs.h that contains defines that alter compiler output. This is implemented for Unix variants that provide the dl dynamic module loading functions and Windows. This does NOT include Mac OSX as they have not conformed to Unix in this respect. For now, this code will fail to compile on any compiler unable to handle it.

Definition at line 38 of file plugin.h.


Public Member Functions

 Plugin ()
virtual bool fromXML (QDomElement &elem)
virtual bool toXML (QDomDocument &doc, QDomElement &elem, std::string id="")
void execPlugin (GLIMSProject *proj)
bool loadFromFile (std::string fname)
std::string getName ()
std::string getFile ()
std::string getDesc ()
virtual bool toXMLFile (std::string fname, std::string docname)
virtual bool fromXMLFile (std::string fname, std::string docname)
virtual void setCurrentVersion (std::string versionString)
virtual void setCurrentVersion (QDate versionQDate)
virtual QDate getCurrentVersion ()
virtual std::string getCurrentVersionStr ()

Protected Member Functions

LIBHANDLE loadPlugin ()
void unloadPlugin (LIBHANDLE hPlug)
virtual bool writeTextTag (QDomDocument &doc, QDomElement &elem, std::string tagName, std::string text, std::string id="")
virtual bool writeIntTag (QDomDocument &doc, QDomElement &elem, std::string tagName, int val, std::string id="")
virtual bool writeDoubleTag (QDomDocument &doc, QDomElement &elem, std::string tagName, double val, std::string id="")
virtual std::string readTextTag (QDomElement elem, std::string tagName="", std::string id="")
virtual int readIntTag (QDomElement elem, std::string tagName="", std::string id="")
virtual double readDoubleTag (QDomElement elem, std::string tagName="", std::string id="")
virtual QDomElement createBaseTag (QDomDocument &doc, QDomElement &elem, std::string id, std::string tagName)
virtual QDomElement getElemByTagName (QDomElement &elem, std::string name)
virtual std::string qDateToString (const QDate *aQDate)
virtual bool stringToQDate (const std::string aStrDate, QDate *aQDate)
virtual std::string qDateTimeToString (const QDateTime *aQDateTime)
virtual bool stringToQDateTime (const std::string aStrDateTime, QDateTime *aQDateTime)

Protected Attributes

std::string mFName
std::string mPlugName
std::string mDesc
QDate mCurrentVersion

Constructor & Destructor Documentation

Plugin::Plugin (  )  [inline]

Definition at line 48 of file plugin.h.


Member Function Documentation

LIBHANDLE Plugin::loadPlugin (  )  [protected]

Definition at line 133 of file plugin.cpp.

References LIBHANDLE, and mFName.

Referenced by execPlugin(), and loadFromFile().

void Plugin::unloadPlugin ( LIBHANDLE  hPlug  )  [protected]

Definition at line 153 of file plugin.cpp.

Referenced by execPlugin(), and loadFromFile().

bool Plugin::fromXML ( QDomElement &  elem  )  [virtual]

Implements XMLSerializeable.

Definition at line 4 of file plugin.cpp.

References mDesc, mFName, mPlugName, and XMLSerializeable::readTextTag().

Referenced by PluginSet::fromXML().

Here is the call graph for this function:

bool Plugin::toXML ( QDomDocument &  doc,
QDomElement &  elem,
std::string  id = "" 
) [virtual]

Implements XMLSerializeable.

Definition at line 18 of file plugin.cpp.

References mDesc, mFName, mPlugName, and XMLSerializeable::writeTextTag().

Here is the call graph for this function:

void Plugin::execPlugin ( GLIMSProject proj  ) 

Definition at line 33 of file plugin.cpp.

References LIBHANDLE, loadPlugin(), and unloadPlugin().

Here is the call graph for this function:

bool Plugin::loadFromFile ( std::string  fname  ) 

Definition at line 62 of file plugin.cpp.

References LIBHANDLE, loadPlugin(), mDesc, mFName, mPlugName, and unloadPlugin().

Referenced by PluginSet::importPlugin().

Here is the call graph for this function:

std::string Plugin::getName (  )  [inline]

Definition at line 63 of file plugin.h.

References mPlugName.

Referenced by PluginSet::importPlugin().

std::string Plugin::getFile (  )  [inline]

Definition at line 66 of file plugin.h.

References mFName.

std::string Plugin::getDesc (  )  [inline]

Definition at line 69 of file plugin.h.

References mDesc.

bool XMLSerializeable::writeTextTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  tagName,
std::string  text,
std::string  id = "" 
) [protected, virtual, inherited]

virtual bool XMLSerializeable::writeIntTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  tagName,
int  val,
std::string  id = "" 
) [inline, protected, virtual, inherited]

virtual bool XMLSerializeable::writeDoubleTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  tagName,
double  val,
std::string  id = "" 
) [inline, protected, virtual, inherited]

std::string XMLSerializeable::readTextTag ( QDomElement  elem,
std::string  tagName = "",
std::string  id = "" 
) [protected, virtual, inherited]

virtual int XMLSerializeable::readIntTag ( QDomElement  elem,
std::string  tagName = "",
std::string  id = "" 
) [inline, protected, virtual, inherited]

virtual double XMLSerializeable::readDoubleTag ( QDomElement  elem,
std::string  tagName = "",
std::string  id = "" 
) [inline, protected, virtual, inherited]

virtual QDomElement XMLSerializeable::createBaseTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  id,
std::string  tagName 
) [inline, protected, virtual, inherited]

QDomElement XMLSerializeable::getElemByTagName ( QDomElement &  elem,
std::string  name 
) [protected, virtual, inherited]

Definition at line 119 of file xmlserializeable.cpp.

Referenced by GlacierIDDef::fromXML().

std::string XMLSerializeable::qDateToString ( const QDate *  aQDate  )  [protected, virtual, inherited]

bool XMLSerializeable::stringToQDate ( const std::string  aStrDate,
QDate *  aQDate 
) [protected, virtual, inherited]

std::string XMLSerializeable::qDateTimeToString ( const QDateTime *  aQDateTime  )  [protected, virtual, inherited]

Definition at line 149 of file xmlserializeable.cpp.

References XMLSerializeable::qDateToString().

Here is the call graph for this function:

bool XMLSerializeable::stringToQDateTime ( const std::string  aStrDateTime,
QDateTime *  aQDateTime 
) [protected, virtual, inherited]

Definition at line 205 of file xmlserializeable.cpp.

References XMLSerializeable::stringToQDate().

Here is the call graph for this function:

bool XMLSerializeable::toXMLFile ( std::string  fname,
std::string  docname 
) [virtual, inherited]

bool XMLSerializeable::fromXMLFile ( std::string  fname,
std::string  docname 
) [virtual, inherited]

void XMLSerializeable::setCurrentVersion ( std::string  versionString  )  [virtual, inherited]

Definition at line 249 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion, and XMLSerializeable::stringToQDate().

Referenced by MainToolbar::setupProj().

Here is the call graph for this function:

void XMLSerializeable::setCurrentVersion ( QDate  versionQDate  )  [virtual, inherited]

Definition at line 254 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion.

QDate XMLSerializeable::getCurrentVersion (  )  [virtual, inherited]

Definition at line 258 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion.

std::string XMLSerializeable::getCurrentVersionStr (  )  [virtual, inherited]

Definition at line 262 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion, and XMLSerializeable::qDateToString().

Here is the call graph for this function:


Member Data Documentation

std::string Plugin::mFName [protected]

Definition at line 40 of file plugin.h.

Referenced by fromXML(), getFile(), loadFromFile(), loadPlugin(), and toXML().

std::string Plugin::mPlugName [protected]

Definition at line 41 of file plugin.h.

Referenced by fromXML(), getName(), loadFromFile(), and toXML().

std::string Plugin::mDesc [protected]

Definition at line 42 of file plugin.h.

Referenced by fromXML(), getDesc(), loadFromFile(), and toXML().

QDate XMLSerializeable::mCurrentVersion [protected, inherited]


The documentation for this class was generated from the following files:

Home | Search | Disclaimers & Privacy | Contact Us
GLIMSView Maintainer: dsoltesz@usgs.gov