Logo Search packages:      
Sourcecode: inkscape version File versions

Inkscape::Extension::Extension Class Reference

#include <extension.h>

Inherited by Inkscape::Extension::Effect, Inkscape::Extension::Input, Inkscape::Extension::Output, and Inkscape::Extension::Print.

List of all members.


Detailed Description

The object that is the basis for the Extension system. This object contains all of the information that all Extension have. The individual items are detailed within. This is the interface that those who want to _use_ the extensions system should use. This is most likely to be those who are inside the Inkscape program.

Definition at line 71 of file extension.h.


Public Types

enum  state_t { STATE_LOADED, STATE_UNLOADED, STATE_DEACTIVATED }

Public Member Functions

virtual bool check (void)
 A function to check the validity of the extension.
void deactivate (void)
 This function diactivates the extension (which makes it unusable, but not deleted).
bool deactivated (void)
 Find out the status of the extension.
 Extension (SPRepr *in_repr, Implementation::Implementation *in_imp)
 Constructs an Extension from a SPRepr.
gchar * get_id (void)
 Get the ID of this extension - not a copy don't delete!
gchar * get_name (void)
 Get the name of this extension - not a copy don't delete!
bool get_param_bool (const gchar *name, const SPReprDoc *doc=NULL)
 Gets a parameter identified by name with the bool placed in value.
float get_param_float (const gchar *name, const SPReprDoc *doc=NULL)
 Gets a parameter identified by name with the float placed in value.
int get_param_int (const gchar *name, const SPReprDoc *doc=NULL)
 Gets a parameter identified by name with the integer placed in value.
const gchar * get_param_string (const gchar *name, const SPReprDoc *doc=NULL)
 Gets a parameter identified by name with the string placed in value. It isn't duplicated into the value string.
SPRepr * get_repr (void)
 A getter for the internal Repr, does not add a reference.
state_t get_state (void)
 A getter for the state variable.
bool loaded (void)
 A quick function to test the state of the extension.
void printFailure (Glib::ustring reason)
 A quick function to print out a standard start of extension errors in the log.
bool set_param_bool (const gchar *name, bool value, SPReprDoc *doc=NULL)
 Sets a parameter identified by name with the boolean in the parameter value.
float set_param_float (const gchar *name, float value, SPReprDoc *doc=NULL)
 Sets a parameter identified by name with the integer in the parameter value.
int set_param_int (const gchar *name, int value, SPReprDoc *doc=NULL)
 Sets a parameter identified by name with the integer in the parameter value.
const gchar * set_param_string (const gchar *name, const gchar *value, SPReprDoc *doc=NULL)
 Sets a parameter identified by name with the string in the parameter value.
void set_state (state_t in_state)
 A function to set whether the extension should be loaded or unloaded.
virtual ~Extension (void)
 Destroys the Extension.

Static Public Member Functions

static void error_file_close (void)
 A function to close the error log file.
static void error_file_open (void)
 A function to open the error log file.

Protected Attributes

Implementation::Implementationimp
SPRepr * repr
ExpirationTimer * timer

Private Types

enum  param_type_t {
  PARAM_BOOL, PARAM_INT, PARAM_FLOAT, PARAM_STRING,
  PARAM_CNT
}

Private Member Functions

void make_param (SPRepr *paramrepr)
 This function creates a parameter that can be used later. This is typically done in the creation of the extension and defined in the XML file describing the extension (it's private so people have to use the system) :).
param_tparam_shared (const gchar *name, GSList *list)
 This function looks through the linked list for a parameter structure with the name of the passed in name.

Private Attributes

std::vector< Dependency * > _deps
state_t _state
gchar * id
gchar * name
GSList * parameters

Static Private Attributes

static std::ofstream error_file

Classes

class  no_overwrite
class  param_not_exist
union  param_switch_t
class  param_t
class  param_wrong_type

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

Generated by  Doxygen 1.6.0   Back to index