# Mixin: Shared

## Shared

A shared object that can be used to store arbitrary data between class instances, and access helper methods.

Source:
  - Shared.js, line 10

### Classes

overload

### Methods

- (static) addModule(name, module)
- (static) finishModule(name)
- (static) moduleExists(name) → {Boolean}
- (static) moduleFinished(name, callback)
- (static) synthesize(obj, name, extendopt)

#### (static) addModule(name, module)

Adds a module to ForerunnerDB.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | String | The name of the module.
`module` | function | The module class.

Source:
  - Shared.js, line 24

#### (static) finishModule(name)

Called by the module once all processing has been completed. Used to determine if the module is ready for use by other modules.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | String | The name of the module.

Source:
  - Shared.js, line 38

#### (static) moduleExists(name) → {Boolean}

Determines if a module has been added to ForerunnerDB or not.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | String | The name of the module.

Source:
  - Shared.js, line 78

##### Returns:

True if the module exists or false if not.

Type
  Boolean

#### (static) moduleFinished(name, callback)

Will call your callback method when the specified module has loaded. If the module is already loaded the callback is called immediately.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | String | The name of the module.
`callback` | function | The callback method to call when the module is loaded.

Source:
  - Shared.js, line 64

#### (static) synthesize(obj, name, extendopt)

Generates a generic getter/setter method for the passed method name.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`obj` | Object |  | The object to add the getter/setter to.
`name` | String |  | The name of the getter/setter to generate.
`extend` | function | <optional> | A method to call before executing the getter/setter. The existing getter/setter can be accessed from the extend method via the $super e.g. this.$super();

Source:
  - Shared.js, line 140

### Members

- (static) mixin
- (static) mixin
- (static) mixins

#### (static) mixin

Adds the properties and methods defined in the mixin to the passed object.

Source:
  - Shared.js, line 83

#### (static) mixin

Adds the properties and methods defined in the mixin to the passed object.

Source:
  - Shared.js, line 105

#### (static) mixins

Define the mixins that other modules can use as required.

Source:
  - Shared.js, line 181