Public Slots | Public Member Functions | Private Member Functions | Private Attributes

# ShBase Class Reference

Main modular subsystem class. More...

`#include <shbase.h>`

Inheritance diagram for ShBase:
[legend]
Collaboration diagram for ShBase:
[legend]

List of all members.

## Public Slots
void | routeMessage (ShMessagePtr message)
| Routes messages to the plug-ins according to configuration stored in the SQL database.
## Public Member Functions
| ShBase (QObject *parent=0)
| Constructor of ShBase, the main modular subsystem class.
## Private Member Functions
void | reload ()
| Updates a structure of plug-ins to reflect changes made in database.
QList< ShPin > | queryPins (int objectId)
| Assembles a list of all pins belonging to given object.
int | queryPinId (int object, QString signal)
| Finds out the pin ID belonging to the given object and signal.
bool | pinBelongsTo (int pin, int object)
| Checks if the given pin ID belongs to the given object.
ShPin | queryPin (int pinId)
| Query the pin ID details.
## Private Attributes
QMap< int, ShObject * > | mObjects

## Detailed Description

Main modular subsystem class.

This class is able to load/unload plugins reflecting configuration stored in the database. It also allows plugins to communicate with each other by routing the messages according to the list of links stored in the database.

Definition at line 36 of file shbase.h.

## Constructor & Destructor Documentation

ShBase::ShBase | ( | QObject * | parent = `0` | ) |

Constructor of ShBase, the main modular subsystem class.

Parameters:

  | parent | Pointer to the parent object

Definition at line 27 of file shbase.cpp.

References reload().

Here is the call graph for this function:

## Member Function Documentation

bool ShBase::pinBelongsTo | ( | int | pin,
|  | int | object |
| ) |  |  | `[private]`

Checks if the given pin ID belongs to the given object.

Parameters:

  | object | Pin ID
  | object | Plug-in ID

Returns:
  true if the pin belongs to the object

Definition at line 165 of file shbase.cpp.

Referenced by routeMessage().

Here is the caller graph for this function:

ShPin ShBase::queryPin | ( | int | pinId | ) | `[private]`

Query the pin ID details.

Parameters:

  | object | Pin ID

Returns:
  Object describing the pin

Definition at line 183 of file shbase.cpp.

References ShPin::setDirection(), ShPin::setObjectId(), ShPin::setSignal(), and ShPin::setType().

Referenced by routeMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

int ShBase::queryPinId | ( | int | object,
|  | QString | signal |
| ) |  |  | `[private]`

Finds out the pin ID belonging to the given object and signal.

Parameters:

  | object | Plug-in ID
  | signal | Name of the signal

Returns:
  Pin id

Definition at line 117 of file shbase.cpp.

Referenced by routeMessage().

Here is the caller graph for this function:

QList< ShPin > ShBase::queryPins | ( | int | objectId | ) | `[private]`

Assembles a list of all pins belonging to given object.

Parameters:

  | object | Plug-in id

Returns:
  List of found pins

Definition at line 135 of file shbase.cpp.

References ShPin::setDirection(), ShPin::setObjectId(), ShPin::setSignal(), and ShPin::setType().

Referenced by reload().

Here is the call graph for this function:

Here is the caller graph for this function:

void ShBase::reload | ( |  | ) | `[private]`

Updates a structure of plug-ins to reflect changes made in database.

Definition at line 36 of file shbase.cpp.

References ShObject::init(), mObjects, queryPins(), routeMessage(), and ShObject::setObjectId().

Referenced by routeMessage(), and ShBase().

Here is the call graph for this function:

Here is the caller graph for this function:

void ShBase::routeMessage | ( | ShMessagePtr | message | ) | `[slot]`

Routes messages to the plug-ins according to configuration stored in the SQL database.

Parameters:

  | message | Shared pointer to the message

Definition at line 207 of file shbase.cpp.

References mObjects, ShPin::objectId(), pinBelongsTo(), queryPin(), queryPinId(), reload(), and ShPin::signal().

Referenced by reload().

Here is the call graph for this function:

Here is the caller graph for this function:

## Member Data Documentation

QMap<int,ShObject*> ShBase::mObjects`[private]`

Definition at line 54 of file shbase.h.

Referenced by reload(), and routeMessage().

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

- daemon/shbase.h
- daemon/shbase.cpp

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends