april  1.0.0
...
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
april::AprilLibrary Class Reference

Represents the root structure for the library. More...

#include <aprillibrary.h>

Classes

struct  LibProps
 entire set of properties More...

Public Member Functions

 AprilLibrary (QObject *parent=NULL)
 constructor;
virtual ~AprilLibrary (void)
 destructor;

Static Public Member Functions

static AprilLibraryunique (void)
 the one and only instance
Plug-in related functionality
static AprilPluginInterfloadPlugIn (const QString &s)
 load a plug-in from the file indicated (may be relative to current directory)
static bool unloadPlugIn (const QString &s)
 unload a plug-in based on file name (may be relative to current directory)
static bool unloadPlugIn (AprilPluginInterf *p)
 unload a plug-in
static bool unloadPlugIn (AprilPluginLoader *pld)
 unload a plug-in
static AprilPluginInterffindPlugIn (const QString &s)
 get the plug-in for a certain file (must be absolute path)
static AprilPluginLoaderfindPlugInLoader (const QString &s)
 get the plug-in loader for a certain file (must be absolute path)
static AprilPluginInterffindPlugInRel (const QString &s)
 get the plug-in for a certain file (may be relative to current directory)
static AprilPluginLoaderfindPlugInLoaderRel (const QString &s)
 get the plug-in loader for a certain file (may be relative to current directory)
static AprilPluginLoaderfirstPlugin (void)
 first plug-in
static int pluginsCount (void)
 the number of plug-ins
static AprilPluginLoaderpluginAt (int i)
 get a plug-in at aspecific index

Friends

class World
class WorldFactory

Properties related functionality

void loadProps (void)
 load properties from permanent storage
void saveProps (void)
 save properties to permanent storage
static LibPropsproperties (void)
 the properties

World related functionality

static bool hasWorld (World *world)
 tell if an world is inside the chain
static void remWorld (World *world)
 remove a world
static WorldfirstWorld (void)
 first world
static QString uniqueWorldName (const QString &pattern)
 get a unique name for a world
static int worldsCount (void)
 the number of worlds
static WorldfindWorld (const QString &s_name)
 find a world by its name
static WorldworldAt (int i)
 get a world at aspecific index
static bool setCrtWorld (World *new_crt)
 seta a world as the current world
static WorldcrtWorld (void)
 tell the current world
static void addWorld (World *world)
 add a world

Factory related functionality

static bool registerFactory (const QString &s_name, FactoryCreator callback)
 register a callback for a particular Factory
static bool unregisterFactory (const QString &s_name, FactoryCreator callback)
 unregister a callback for a particular Factory
static QString defaultWorldFactoryName (void)
 get the name used by the defalt WorldFactory
static FactoryfactoryForString (World *w, const QString &s_name)
 get the factory that coresponds to given string
static WorldFactoryfindWorldFactory (const QString &s)
 find a world factory in internal list
static bool addWorldFactory (const QString &s, WorldFactory *inst)
 adds a world factory to internal list
static bool remWorldFactory (const QString &s, WorldFactory *inst)
 removes a world factory from internal list

Detailed Description

Represents the root structure for the library.

Member Function Documentation

void AprilLibrary::addWorld ( World world)
staticprotected

add a world

Do not use directly. This method is used by World constructor to signal the parent library.

WorldFactory * AprilLibrary::findWorldFactory ( const QString &  s)
static

find a world factory in internal list

The method does not add a reference; the caller must do that itself

Parameters
sthe string to search
Returns
the pointer or NULL if not found
void AprilLibrary::loadProps ( void  )

load properties from permanent storage

The constructor automatically loads properties

void AprilLibrary::saveProps ( void  )

save properties to permanent storage

Changes to properties need to be explicitly saved


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