Module

Engine/source/core/module.h

An engine component that requires initialization and/or cleanup.

More...

Classes:

class

Entry in the list of dependencies.

class

Record for module that this module overrides.

Protected Types

enum
DependencyType {
  DependencyBefore 
  DependencyAfter 
}

Direction of a dependency edge.

enum
Mode {
  ModeInitialize 
  ModeShutdown 
}

Public Types

Parent 

Public Friends

Protected Attributes

List of modules to which the initialization of this module has dependency relations.

bool

Flag to make sure we don't shutdown modules that have not been initialized.

Next module in the global module list.

List of modules being overriden by this module.

List of modules to which the shutdown of this module has dependency relations.

Protected Static Attributes

Global list of modules.

Protected Functions

bool

Return true if this module is constrained to follow "module" in the given "mode".

bool

Return true if this module is constrained to precede "module" in the given "mode".

Public Functions

const char *

Return the module name.

Initialize the module.

Shut down the module.

Detailed Description

An engine component that requires initialization and/or cleanup.

Protected Types

DependencyType

Enumerator

DependencyBefore
DependencyAfter

Direction of a dependency edge.

Mode

Enumerator

ModeInitialize
ModeShutdown

Public Types

typedef void Parent 

Public Friends

Protected Attributes

Dependency * mInitDependencies 

List of modules to which the initialization of this module has dependency relations.

bool mIsInitialized 

Flag to make sure we don't shutdown modules that have not been initialized.

Module * mNext 

Next module in the global module list.

Override * mOverrides 

List of modules being overriden by this module.

Dependency * mShutdownDependencies 

List of modules to which the shutdown of this module has dependency relations.

Protected Static Attributes

Module * smFirst 

Global list of modules.

Protected Functions

Module()

_constrainedToComeAfter(Module * module, Mode mode)

Return true if this module is constrained to follow "module" in the given "mode".

_constrainedToComeBefore(Module * module, Mode mode)

Return true if this module is constrained to precede "module" in the given "mode".

_getDependencies(Mode mode)

Public Functions

getName()

Return the module name.

initialize()

Initialize the module.

This is only called after all modules that this module depends on have been initialized.

shutdown()

Shut down the module.

This is called before any module that this module depends on have been shut down.