FLTK 1.3.4
Fl_Plugin_Manager Class Reference

Fl_Plugin_Manager manages link-time and run-time plugin binaries. More...

#include <Fl_Plugin.H>

Inheritance diagram for Fl_Plugin_Manager:
Fl_Preferences

Public Member Functions

Fl_Preferences::ID addPlugin (const char *name, Fl_Plugin *plugin)
 This function adds a new plugin to the database. More...
 
 Fl_Plugin_Manager (const char *klass)
 Manage all plugins belonging to one class.
 
Fl_Pluginplugin (int index)
 Return the address of a plugin by index.
 
Fl_Pluginplugin (const char *name)
 Return the address of a plugin by name.
 
int plugins ()
 Return the number of plugins in the klass.
 
 ~Fl_Plugin_Manager ()
 Remove the plugin manager. More...
 
- Public Member Functions inherited from Fl_Preferences
char clear ()
 Delete all groups and all entries.
 
char deleteAllEntries ()
 Delete all entries.
 
char deleteAllGroups ()
 Delete all groups.
 
char deleteEntry (const char *entry)
 Deletes a single name/value pair. More...
 
char deleteGroup (const char *group)
 Deletes a group. More...
 
int entries ()
 Returns the number of entries (name/value pairs) in a group. More...
 
const char * entry (int index)
 Returns the name of an entry. More...
 
char entryExists (const char *key)
 Returns non-zero if an entry with this name exists. More...
 
 Fl_Preferences (Root root, const char *vendor, const char *application)
 The constructor creates a group that manages name/value pairs and child groups. More...
 
 Fl_Preferences (const char *path, const char *vendor, const char *application)
 Use this constructor to create or read a preferences file at an arbitrary position in the file system. More...
 
 Fl_Preferences (Fl_Preferences &parent, const char *group)
 Generate or read a new group of entries within another group. More...
 
 Fl_Preferences (Fl_Preferences *parent, const char *group)
 Create or access a group of preferences using a name. More...
 
 Fl_Preferences (Fl_Preferences &parent, int groupIndex)
 Open a child group using a given index. More...
 
 Fl_Preferences (Fl_Preferences *parent, int groupIndex)
 
 Fl_Preferences (const Fl_Preferences &)
 Create another reference to a Preferences group.
 
 Fl_Preferences (ID id)
 Create a new dataset access point using a dataset ID. More...
 
void flush ()
 Writes all preferences to disk. More...
 
char get (const char *entry, int &value, int defaultValue)
 Reads an entry from the group. More...
 
char get (const char *entry, float &value, float defaultValue)
 Reads an entry from the group. More...
 
char get (const char *entry, double &value, double defaultValue)
 Reads an entry from the group. More...
 
char get (const char *entry, char *&value, const char *defaultValue)
 Reads an entry from the group. More...
 
char get (const char *entry, char *value, const char *defaultValue, int maxSize)
 Reads an entry from the group. More...
 
char get (const char *entry, void *&value, const void *defaultValue, int defaultSize)
 Reads an entry from the group. More...
 
char get (const char *entry, void *value, const void *defaultValue, int defaultSize, int maxSize)
 Reads an entry from the group. More...
 
char getUserdataPath (char *path, int pathlen)
 Creates a path that is related to the preferences file and that is usable for additional application data. More...
 
const char * group (int num_group)
 Returns the name of the Nth (num_group) group. More...
 
char groupExists (const char *key)
 Returns non-zero if a group with this name exists. More...
 
int groups ()
 Returns the number of groups that are contained within a group. More...
 
ID id ()
 Return an ID that can later be reused to open more references to this dataset.
 
const char * name ()
 Return the name of this entry.
 
const char * path ()
 Return the full path to this entry.
 
char set (const char *entry, int value)
 Sets an entry (name/value pair). More...
 
char set (const char *entry, float value)
 Sets an entry (name/value pair). More...
 
char set (const char *entry, float value, int precision)
 Sets an entry (name/value pair). More...
 
char set (const char *entry, double value)
 Sets an entry (name/value pair). More...
 
char set (const char *entry, double value, int precision)
 Sets an entry (name/value pair). More...
 
char set (const char *entry, const char *value)
 Sets an entry (name/value pair). More...
 
char set (const char *entry, const void *value, int size)
 Sets an entry (name/value pair). More...
 
int size (const char *entry)
 Returns the size of the value part of an entry. More...
 
virtual ~Fl_Preferences ()
 The destructor removes allocated resources. More...
 

Static Public Member Functions

static int load (const char *filename)
 Load a module from disk. More...
 
static int loadAll (const char *filepath, const char *pattern=0)
 Use this function to load a whole directory full of modules.
 
static void removePlugin (Fl_Preferences::ID id)
 Remove any plugin. More...
 
- Static Public Member Functions inherited from Fl_Preferences
static const char * newUUID ()
 Returns a UUID as generated by the system. More...
 
static char remove (ID id_)
 Remove the group with this ID from a database.
 

Additional Inherited Members

- Public Types inherited from Fl_Preferences
typedef void * ID
 Every Fl_Preferences-Group has a uniqe ID. More...
 
enum  Root { SYSTEM =0, USER }
 Define the scope of the preferences. More...
 
- Protected Attributes inherited from Fl_Preferences
Nodenode
 
RootNoderootNode
 

Detailed Description

Fl_Plugin_Manager manages link-time and run-time plugin binaries.

See Also
Fl_Plugin

Constructor & Destructor Documentation

Fl_Plugin_Manager::~Fl_Plugin_Manager ( )

Remove the plugin manager.

Calling this does not remove the database itself or any plugins. It just removes the reference to the database.

Member Function Documentation

Fl_Preferences::ID Fl_Plugin_Manager::addPlugin ( const char *  name,
Fl_Plugin plugin 
)

This function adds a new plugin to the database.

There is no need to call this function explicitly. Every Fl_Plugin constructor will call this function at initialization time.

int Fl_Plugin_Manager::load ( const char *  filename)
static

Load a module from disk.

A module must be a dynamically linkable file for the given operating system. When loading a module, its +init function will be called which in turn calls the constructor of all statically initialized Fl_Plugin classes and adds them to the database.

void Fl_Plugin_Manager::removePlugin ( Fl_Preferences::ID  id)
static

Remove any plugin.

There is no need to call this function explicitly. Every Fl_Plugin destructor will call this function at destruction time.


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