Template Class Dependency

Inheritance Relationships

Base Type

Class Documentation

template<class ComponentType, bool isSoft>
class Dependency : public Dependable

Depend on a component either softly (recoverable from dependency breakage) or harshly (cannot recover from breakage).

Public Functions

Dependency(Component *dependedBy)
ComponentType *getComponent()
const ComponentType *getComponent() const
void setComponent(Component *component)
ComponentID getID() const

Get the ID of the component which is depended upon. This should not use the component object because it is nullptr when this is called.

bool isValid() const

Return if the dependency has been evaluated properly.