Ingen  0.5.1
Public Types | Public Member Functions | List of all members
Ingen::World Class Reference

The "world" all Ingen modules share. More...

#include <World.hpp>

+ Inheritance diagram for Ingen::World:
+ Collaboration diagram for Ingen::World:

Public Types

typedef SPtr< Interface >(* InterfaceFactory) (World *world, const Raul::URI &engine_uri, SPtr< Interface > respondee)
 A function to create a new remote Interface. More...
 

Public Member Functions

 World (int &argc, char **&argv, LV2_URID_Map *map, LV2_URID_Unmap *unmap, LV2_Log_Log *log)
 Construct a new Ingen world. More...
 
virtual bool load_module (const char *name)
 Load an Ingen module by name (e.g. More...
 
virtual bool run_module (const char *name)
 Run a loaded module (modules that "run" only, e.g. More...
 
virtual void add_interface_factory (const std::string &scheme, InterfaceFactory factory)
 Register an InterfaceFactory (for module implementations). More...
 
virtual SPtr< Interfacenew_interface (const Raul::URI &engine_uri, SPtr< Interface > respondee)
 Return a new Interface to control a server. More...
 
virtual bool run (const std::string &mime_type, const std::string &filename)
 Run a script. More...
 
virtual void set_engine (SPtr< EngineBase > e)
 
virtual void set_interface (SPtr< Interface > e)
 
virtual void set_store (SPtr< Store > s)
 
virtual SPtr< EngineBaseengine ()
 
virtual SPtr< Interfaceinterface ()
 
virtual SPtr< Parserparser ()
 
virtual SPtr< Serialiserserialiser ()
 
virtual SPtr< Storestore ()
 
virtual int & argc ()
 
virtual char **& argv ()
 
virtual Configurationconf ()
 
virtual std::mutex & rdf_mutex ()
 Lock for rdf_world() or lilv_world(). More...
 
virtual Sord::World * rdf_world ()
 
virtual LilvWorld * lilv_world ()
 
virtual LV2Featureslv2_features ()
 
virtual Ingen::Forgeforge ()
 
virtual URIMapuri_map ()
 
virtual URIsuris ()
 
virtual void set_jack_uuid (const std::string &uuid)
 
virtual std::string jack_uuid ()
 
virtual Loglog ()
 

Detailed Description

The "world" all Ingen modules share.

This is the root to which all components of Ingen are connected. It contains all necessary shared data (including the world for libraries like Sord and Lilv) and holds references to components.

Some functionality in Ingen is implemented in dynamically loaded modules, which are loaded using this interface. When loaded, those modules add facilities to the World which can then be used throughout the code.

The world is used in any process which uses the Ingen as a library, both client and server (e.g. the world may not actually contain an Engine, since it maybe running in another process or even on a different machine).

Member Typedef Documentation

§ InterfaceFactory

typedef SPtr<Interface>(* Ingen::World::InterfaceFactory) (World *world, const Raul::URI &engine_uri, SPtr< Interface > respondee)

A function to create a new remote Interface.

Constructor & Destructor Documentation

§ World()

Ingen::World::World ( int &  argc,
char **&  argv,
LV2_URID_Map *  map,
LV2_URID_Unmap *  unmap,
LV2_Log_Log *  log 
)

Construct a new Ingen world.

Parameters
argcArgument count (as in C main())
argvArgument vector (as in C main())
mapLV2 URID map implementation, or NULL to use internal.
unmapLV2 URID unmap implementation, or NULL to use internal.
logLV2 log implementation, or NULL to use internal.

Member Function Documentation

§ load_module()

bool Ingen::World::load_module ( const char *  name)
virtual

Load an Ingen module by name (e.g.

"server", "gui", etc.)

Returns
True on success.

References Ingen::Module::library.

§ run_module()

bool Ingen::World::run_module ( const char *  name)
virtual

Run a loaded module (modules that "run" only, e.g.

gui).

Returns
True on success.

§ add_interface_factory()

void Ingen::World::add_interface_factory ( const std::string &  scheme,
InterfaceFactory  factory 
)
virtual

Register an InterfaceFactory (for module implementations).

§ new_interface()

SPtr< Interface > Ingen::World::new_interface ( const Raul::URI &  engine_uri,
SPtr< Interface respondee 
)
virtual

Return a new Interface to control a server.

Get an interface for a remote engine at engine_uri

Parameters
engine_uriThe URI of the possibly remote server to control.
respondeeThe Interface that will receive responses to commands and broadcasts, if applicable.

§ run()

bool Ingen::World::run ( const std::string &  mime_type,
const std::string &  filename 
)
virtual

Run a script.

Run a script of type mime_type at filename filename

§ rdf_mutex()

std::mutex & Ingen::World::rdf_mutex ( )
virtual

Lock for rdf_world() or lilv_world().


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