Envision
A visual programming IDE for object-oriented languages
Classes | Functions | Variables
Core Namespace Reference

This is the main executable that simply loads all available plug-ins and initializes Qt's graphical subsystem. More...

Classes

class  AdapterManager
 
class  EnvisionApplication
 
class  EnvisionException
 The EnvisionException class is the base class of all exception classes in Envision. More...
 
class  EnvisionManager
 The EnvisionManager interface provides various information about the Envision system. More...
 
class  EnvisionPlugin
 This EnvisionPlugin interface is the one that each plug-in must implement. More...
 
struct  PluginDependency
 Specifies a plug-in dependency. More...
 
struct  PluginInfo
 Descibres a plug-in and specifies which plug-ins it depends on. More...
 
class  PluginManager
 
struct  ProfileJob
 
class  Profiler
 
class  Reflect
 
class  TestEvent
 
class  TestRunner
 
class  TypeRegistry
 

Functions

int coreMain (int argc, char *argv[])
 This function is executed when Envision is started. More...
 
QString readNamePart (const char *part, const char *&nextPart)
 

Variables

static constexpr bool DISABLE_ALL = true
 
static constexpr bool DISABLE_CALL_PROFILING = false || DISABLE_ALL
 
static constexpr bool DISABLE_TIME_MEASUREMENT = false || DISABLE_ALL
 

Detailed Description

This is the main executable that simply loads all available plug-ins and initializes Qt's graphical subsystem.

The application executable is responsible for initializing the application and starting all plug-ins. Once the application is loaded this module is mostly passive unless a plug-in requests its services. Here are all the tasks performed on startup in order of execution:

  1. The QApplication object of Qt is initialized.
  2. All plug-ins are loaded. Plug-ins which have dependencies are only loaded after the plug-ins they depend on have been loaded. If a plug-in cannot be started due to dependency problems, Envision is halted with an exception.
  3. After all plug-ins are loaded, any tests which were specified on the command line are enqueued.
  4. The Qt event loop is started. At this point plug-ins will receive a request for self-testing if the user specified this.

As soon as a plug-in is loaded, its initialization routine is called. If any events are enqueued by the plug-ins during their initialization, these will precede the requests for self-testing. Running tests after all other plug-ins have been loaded and initialization is finished can be helpful in discovering integration problems.

As Qt requires, the main application window and the corresponding Qt event queue are part of the executable. This module itself however does not use the window in any way. Plug-ins are responsible for defining the interface of Envision.

Plug-in interface

Each Envision plug-in consists of at least two files:

Plug-ins are discovered by searching for meta information files. The name of this file should match the name of the shared library.

The shared library interface that each plug-in must implement is specified by the executable module. This interface is defined according to Qt’s QPlugin design principles. It includes methods for initialization and testing. When a plug-in is initialized it is given a reference to an EnvisionManager interface. Using this interface a plug-in can draw on the main window or query the system about the state of Envision. In particular it is possible to get information about what plug-ins are installed and running.

Function Documentation

◆ coreMain()

int Q_DECL_IMPORT Core::coreMain ( int  argc,
char *  argv[] 
)

This function is executed when Envision is started.

It shows the main window, loads all plug-ins and starts the event loop.

◆ readNamePart()

QString Q_DECL_IMPORT Core::readNamePart ( const char *  part,
const char *&  nextPart 
)

Variable Documentation

◆ DISABLE_ALL

constexpr bool Core::DISABLE_ALL = true
staticconstexpr

◆ DISABLE_CALL_PROFILING

constexpr bool Core::DISABLE_CALL_PROFILING = false || DISABLE_ALL
staticconstexpr

◆ DISABLE_TIME_MEASUREMENT

constexpr bool Core::DISABLE_TIME_MEASUREMENT = false || DISABLE_ALL
staticconstexpr